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

COVERAGE SUMMARY FOR SOURCE FILE [CustomizationParameters.java]

nameclass, %method, %block, %line, %
CustomizationParameters.java100% (1/1)29%  (2/7)34%  (42/124)45%  (13/29)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CustomizationParameters100% (1/1)29%  (2/7)34%  (42/124)45%  (13/29)
canCustomizeNetwork (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
canCustomizePassword (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
canCustomizeSSH (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/39)0%   (0/6)
toString (): String 0%   (0/1)0%   (0/22)0%   (0/1)
equals (Object): boolean 100% (1/1)71%  (30/42)57%  (8/14)
CustomizationParameters (boolean, boolean, boolean): void 100% (1/1)100% (12/12)100% (5/5)

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.domain;
20 
21/**
22 * The response lists which customization options are supported for this
23 * particular vApp. The possible customization options are Network and Password.
24 * 
25 * @author Adrian Cole
26 * @see <a
27 *      href="https://community.vcloudexpress.terremark.com/en-us/product_docs/w/wiki/6-using-the-vcloud-express-api.aspx"
28 *      >Terremark documentation</a>
29 */
30public class CustomizationParameters {
31   private final boolean customizeNetwork;
32   private final boolean customizePassword;
33   private final boolean customizeSSH;
34 
35   public CustomizationParameters(boolean customizeNetwork,
36         boolean customizePassword, boolean customizeSSH) {
37      this.customizeNetwork = customizeNetwork;
38      this.customizePassword = customizePassword;
39      this.customizeSSH = customizeSSH;
40   }
41 
42   public boolean canCustomizeNetwork() {
43      return customizeNetwork;
44   }
45 
46   public boolean canCustomizePassword() {
47      return customizePassword;
48   }
49 
50   public boolean canCustomizeSSH() {
51      return customizeSSH;
52   }
53 
54   @Override
55   public int hashCode() {
56      final int prime = 31;
57      int result = 1;
58      result = prime * result + (customizeNetwork ? 1231 : 1237);
59      result = prime * result + (customizePassword ? 1231 : 1237);
60      result = prime * result + (customizeSSH ? 1231 : 1237);
61      return result;
62   }
63 
64   @Override
65   public boolean equals(Object obj) {
66      if (this == obj)
67         return true;
68      if (obj == null)
69         return false;
70      if (getClass() != obj.getClass())
71         return false;
72      CustomizationParameters other = (CustomizationParameters) obj;
73      if (customizeNetwork != other.customizeNetwork)
74         return false;
75      if (customizePassword != other.customizePassword)
76         return false;
77      if (customizeSSH != other.customizeSSH)
78         return false;
79      return true;
80   }
81 
82   @Override
83   public String toString() {
84      return "CustomizationParameters [customizeNetwork=" + customizeNetwork
85            + ", customizePassword=" + customizePassword + ", customizeSSH="
86            + customizeSSH + "]";
87   }
88}

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