EMMA Coverage Report (generated Mon Oct 17 05:41:20 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 * 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.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