EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.deltacloud.domain]

COVERAGE SUMMARY FOR SOURCE FILE [EnumHardwareProperty.java]

nameclass, %method, %block, %line, %
EnumHardwareProperty.java100% (1/1)33%  (1/3)27%  (15/55)60%  (3/5)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EnumHardwareProperty100% (1/1)33%  (1/3)27%  (15/55)60%  (3/5)
getAvailableValues (): Set 0%   (0/1)0%   (0/3)0%   (0/1)
toString (): String 0%   (0/1)0%   (0/37)0%   (0/1)
EnumHardwareProperty (String, String, Object, HardwareParameter, Set): void 100% (1/1)100% (15/15)100% (3/3)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  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,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.deltacloud.domain;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23import java.util.Set;
24 
25import com.google.common.collect.ImmutableSet;
26 
27/**
28 * 
29 * @author Adrian Cole
30 */
31public class EnumHardwareProperty extends ParameterizedHardwareProperty {
32 
33   private final Set<Object> availableValues;
34 
35   public EnumHardwareProperty(String name, String unit, Object value, HardwareParameter param,
36         Set<Object> availableValues) {
37      super(Kind.FIXED, name, unit, value, param);
38      this.availableValues = ImmutableSet.copyOf(checkNotNull(availableValues, "availableValues"));
39   }
40 
41   /**
42    * 
43    * @return a set of available values
44    */
45   public Set<Object> getAvailableValues() {
46      return availableValues;
47   }
48 
49   @Override
50   public String toString() {
51      return "[kind=" + getKind() + ", name=" + getName() + ", unit=" + getUnit() + ", value=" + getValue()
52            + ", param=" + getParam() + ", availableValues=" + availableValues + "]";
53   }
54}

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