EMMA Coverage Report (generated Wed Jun 22 19:47:49 EDT 2011)
[all classes][org.jclouds.deltacloud.domain]

COVERAGE SUMMARY FOR SOURCE FILE [HardwareProperty.java]

nameclass, %method, %block, %line, %
HardwareProperty.java100% (1/1)100% (5/5)96%  (65/68)75%  (6/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class HardwareProperty$Kind100% (1/1)100% (5/5)96%  (65/68)75%  (6/8)
fromValue (String): HardwareProperty$Kind 100% (1/1)70%  (7/10)33%  (1/3)
<static initializer> 100% (1/1)100% (44/44)100% (5/5)
HardwareProperty$Kind (String, int): void 100% (1/1)100% (5/5)100% (1/1)
valueOf (String): HardwareProperty$Kind 100% (1/1)100% (5/5)100% (1/1)
values (): HardwareProperty$Kind [] 100% (1/1)100% (4/4)100% (1/1)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.deltacloud.domain;
20 
21/**
22 *
23 * Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
24 *
25 * ====================================================================
26 * Licensed under the Apache License, Version 2.0 (the "License");
27 * you may not use this file except in compliance with the License.
28 * You may obtain a copy of the License at
29 *
30 * http://www.apache.org/licenses/LICENSE-2.0
31 *
32 * Unless required by applicable law or agreed to in writing, software
33 * distributed under the License is distributed on an "AS IS" BASIS,
34 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35 * See the License for the specific language governing permissions and
36 * limitations under the License.
37 * ====================================================================
38 */
39 
40import static com.google.common.base.Preconditions.checkNotNull;
41 
42/**
43 * 
44 * @author Adrian Cole
45 */
46public interface HardwareProperty {
47   public static enum Kind {
48      /**
49       * only the value specified in the property is available
50       */
51      FIXED,
52      /**
53       * a list of available values is provided
54       */
55      ENUM,
56      /**
57       * available values are described by a numeric range
58       */
59      RANGE,
60      /**
61       * type returned as something besides the above.
62       */
63      UNRECOGNIZED;
64 
65      public static HardwareProperty.Kind fromValue(String kind) {
66         try {
67            return valueOf(checkNotNull(kind, "kind").toUpperCase());
68         } catch (IllegalArgumentException e) {
69            return UNRECOGNIZED;
70         }
71      }
72   }
73 
74   /**
75    * 
76    * @return describes the values to chose from.
77    */
78   HardwareProperty.Kind getKind();
79 
80   /**
81    * 
82    * @return the type of the property: e.g. memory or storage
83    */
84   String getName();
85 
86   /**
87    * 
88    * @return the units in which the value is specified: MB, GB, count or label
89    */
90   String getUnit();
91 
92   /**
93    * 
94    * @return the actual value of the property. It depends on the specified unit: 1024, 2 on x86_64
95    */
96   Object getValue();
97}

[all classes][org.jclouds.deltacloud.domain]
EMMA 2.0.5312 (C) Vladimir Roubtsov