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

COVERAGE SUMMARY FOR SOURCE FILE [InstantiateVAppTemplateParams.java]

nameclass, %method, %block, %line, %
InstantiateVAppTemplateParams.java0%   (0/1)0%   (0/7)0%   (0/157)0%   (0/39)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class InstantiateVAppTemplateParams0%   (0/1)0%   (0/7)0%   (0/157)0%   (0/39)
InstantiateVAppTemplateParams (String, VirtualSystemSettingData, Iterable): void 0%   (0/1)0%   (0/17)0%   (0/6)
equals (Object): boolean 0%   (0/1)0%   (0/69)0%   (0/23)
getInfo (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getResourceAllocationSettingDatas (): Set 0%   (0/1)0%   (0/3)0%   (0/1)
getSystem (): VirtualSystemSettingData 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/45)0%   (0/6)
toString (): String 0%   (0/1)0%   (0/17)0%   (0/1)

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.domain;
20 
21import java.util.Set;
22 
23import org.jclouds.cim.ResourceAllocationSettingData;
24import org.jclouds.cim.VirtualSystemSettingData;
25 
26import com.google.common.collect.Iterables;
27import com.google.common.collect.Sets;
28 
29/**
30 * The InstantiateVAppTemplateParams element forms the body of an instantiateVappTemplate request.
31 */
32public class InstantiateVAppTemplateParams {
33 
34   protected final String info;
35   protected final VirtualSystemSettingData virtualSystem;
36   protected final Set<ResourceAllocationSettingData> resourceAllocations = Sets.newLinkedHashSet();
37 
38   public InstantiateVAppTemplateParams(String info, VirtualSystemSettingData virtualSystem, Iterable<? extends ResourceAllocationSettingData> resourceAllocations) {
39      this.info = info;
40      this.virtualSystem = virtualSystem;
41      Iterables.addAll(this.resourceAllocations, resourceAllocations);
42   }
43 
44   public String getInfo() {
45      return info;
46   }
47 
48   public VirtualSystemSettingData getSystem() {
49      return virtualSystem;
50   }
51 
52   public Set<? extends ResourceAllocationSettingData> getResourceAllocationSettingDatas() {
53      return resourceAllocations;
54   }
55 
56   @Override
57   public String toString() {
58      return "[info=" + getInfo() + ", virtualSystem=" + getSystem() + "]";
59   }
60 
61   @Override
62   public int hashCode() {
63      final int prime = 31;
64      int result = 1;
65      result = prime * result + ((info == null) ? 0 : info.hashCode());
66      result = prime * result + ((resourceAllocations == null) ? 0 : resourceAllocations.hashCode());
67      result = prime * result + ((virtualSystem == null) ? 0 : virtualSystem.hashCode());
68      return result;
69   }
70 
71   @Override
72   public boolean equals(Object obj) {
73      if (this == obj)
74         return true;
75      if (obj == null)
76         return false;
77      if (getClass() != obj.getClass())
78         return false;
79      InstantiateVAppTemplateParams other = (InstantiateVAppTemplateParams) obj;
80      if (info == null) {
81         if (other.info != null)
82            return false;
83      } else if (!info.equals(other.info))
84         return false;
85      if (resourceAllocations == null) {
86         if (other.resourceAllocations != null)
87            return false;
88      } else if (!resourceAllocations.equals(other.resourceAllocations))
89         return false;
90      if (virtualSystem == null) {
91         if (other.virtualSystem != null)
92            return false;
93      } else if (!virtualSystem.equals(other.virtualSystem))
94         return false;
95      return true;
96   }
97 
98}

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