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