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

COVERAGE SUMMARY FOR SOURCE FILE [CloneVAppOptions.java]

nameclass, %method, %block, %line, %
CloneVAppOptions.java50%  (1/2)64%  (7/11)58%  (35/60)66%  (12.5/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CloneVAppOptions$Builder0%   (0/1)0%   (0/4)0%   (0/25)0%   (0/7)
CloneVAppOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
deploy (): CloneVAppOptions 0%   (0/1)0%   (0/7)0%   (0/2)
powerOn (): CloneVAppOptions 0%   (0/1)0%   (0/7)0%   (0/2)
withDescription (String): CloneVAppOptions 0%   (0/1)0%   (0/8)0%   (0/2)
     
class CloneVAppOptions100% (1/1)100% (7/7)100% (35/35)100% (13/13)
CloneVAppOptions (): void 100% (1/1)100% (3/3)100% (2/2)
deploy (): CloneVAppOptions 100% (1/1)100% (5/5)100% (2/2)
getDescription (): String 100% (1/1)100% (3/3)100% (1/1)
isDeploy (): boolean 100% (1/1)100% (3/3)100% (1/1)
isPowerOn (): boolean 100% (1/1)100% (3/3)100% (1/1)
powerOn (): CloneVAppOptions 100% (1/1)100% (9/9)100% (3/3)
withDescription (String): CloneVAppOptions 100% (1/1)100% (9/9)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.trmk.vcloud_0_8.options;
20 
21import static com.google.common.base.Preconditions.*;
22 
23/**
24 * 
25 * @author Adrian Cole
26 * 
27 */
28public class CloneVAppOptions {
29 
30   private boolean deploy;
31   private boolean powerOn;
32   private String description;
33 
34   /**
35    * the clone should be deployed after it is created
36    */
37   public CloneVAppOptions deploy() {
38      this.deploy = true;
39      return this;
40   }
41 
42   /**
43    * the clone should be powered on after it is deployed
44    */
45   public CloneVAppOptions powerOn() {
46      checkState(deploy, "must set deploy before setting powerOn");
47      powerOn = true;
48      return this;
49   }
50 
51   /**
52    * the clone should be powered on after it is deployed
53    */
54   public CloneVAppOptions withDescription(String description) {
55      checkNotNull(description, "description");
56      this.description = description;
57      return this;
58   }
59 
60   public boolean isDeploy() {
61      return deploy;
62   }
63 
64   public boolean isPowerOn() {
65      return powerOn;
66   }
67 
68   public String getDescription() {
69      return description;
70   }
71 
72   public static class Builder {
73 
74      /**
75       * @see CloneVAppOptions#deploy()
76       */
77      public static CloneVAppOptions deploy() {
78         CloneVAppOptions options = new CloneVAppOptions();
79         return options.deploy();
80      }
81 
82      /**
83       * @see CloneVAppOptions#powerOn()
84       */
85      public static CloneVAppOptions powerOn() {
86         CloneVAppOptions options = new CloneVAppOptions();
87         return options.powerOn();
88      }
89 
90      /**
91       * @see CloneVAppOptions#withDescription(String)
92       */
93      public static CloneVAppOptions withDescription(String description) {
94         CloneVAppOptions options = new CloneVAppOptions();
95         return options.withDescription(description);
96      }
97   }
98 
99}

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