EMMA Coverage Report (generated Wed Aug 10 12:30:04 EDT 2011)
[all classes][org.jclouds.vcloud.options]

COVERAGE SUMMARY FOR SOURCE FILE [CatalogItemOptions.java]

nameclass, %method, %block, %line, %
CatalogItemOptions.java100% (2/2)75%  (6/8)80%  (35/44)88%  (9.7/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CatalogItemOptions$Builder100% (1/1)33%  (1/3)40%  (6/15)33%  (1/3)
CatalogItemOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
properties (Map): CatalogItemOptions 0%   (0/1)0%   (0/6)0%   (0/1)
description (String): CatalogItemOptions 100% (1/1)100% (6/6)100% (1/1)
     
class CatalogItemOptions100% (1/1)100% (5/5)100% (29/29)100% (9/9)
CatalogItemOptions (): void 100% (1/1)100% (6/6)100% (3/3)
description (String): CatalogItemOptions 100% (1/1)100% (8/8)100% (2/2)
getDescription (): String 100% (1/1)100% (3/3)100% (1/1)
getProperties (): Map 100% (1/1)100% (3/3)100% (1/1)
properties (Map): CatalogItemOptions 100% (1/1)100% (9/9)100% (2/2)

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.vcloud.options;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23import java.util.Map;
24 
25import com.google.common.collect.ImmutableMap;
26import com.google.common.collect.Maps;
27 
28/**
29 * 
30 * @author Adrian Cole
31 * 
32 */
33public class CatalogItemOptions {
34 
35   private String description;
36   private Map<String, String> properties = Maps.newLinkedHashMap();
37 
38   /**
39    * optional description for the CatalogItem
40    */
41   public CatalogItemOptions description(String description) {
42      this.description = checkNotNull(description, "description");
43      return this;
44   }
45 
46   /**
47    * optional properties for the CatalogItem
48    */
49   public CatalogItemOptions properties(Map<String, String> properties) {
50      this.properties = ImmutableMap.copyOf(checkNotNull(properties, "properties"));
51      return this;
52   }
53 
54   public String getDescription() {
55      return description;
56   }
57 
58   public Map<String, String> getProperties() {
59      return properties;
60   }
61 
62   public static class Builder {
63 
64      /**
65       * @see CatalogItemOptions#description
66       */
67      public static CatalogItemOptions description(String description) {
68         return new CatalogItemOptions().description(description);
69      }
70 
71      /**
72       * @see CatalogItemOptions#properties
73       */
74      public static CatalogItemOptions properties(Map<String, String> properties) {
75         return new CatalogItemOptions().properties(properties);
76      }
77   }
78 
79}

[all classes][org.jclouds.vcloud.options]
EMMA 2.0.5312 (C) Vladimir Roubtsov