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 [VAppExtendedInfo.java]

nameclass, %method, %block, %line, %
VAppExtendedInfo.java0%   (0/1)0%   (0/11)0%   (0/274)0%   (0/58)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VAppExtendedInfo0%   (0/1)0%   (0/11)0%   (0/274)0%   (0/58)
VAppExtendedInfo (String, URI, String, List, String, List): void 0%   (0/1)0%   (0/21)0%   (0/8)
compareTo (VAppExtendedInfo): int 0%   (0/1)0%   (0/11)0%   (0/1)
equals (Object): boolean 0%   (0/1)0%   (0/101)0%   (0/33)
getHref (): URI 0%   (0/1)0%   (0/3)0%   (0/1)
getId (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getLongName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getNetworkAdapters (): List 0%   (0/1)0%   (0/3)0%   (0/1)
getTags (): List 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/84)0%   (0/9)
toString (): String 0%   (0/1)0%   (0/39)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.trmk.vcloud_0_8.domain;
20 
21import java.net.URI;
22import java.util.List;
23 
24/**
25 * @author Seshu Pasam
26 */
27public class VAppExtendedInfo implements Comparable<VAppExtendedInfo> {
28   private final String id;
29   private final URI href;
30   private final String name;
31   private final List<String> tags;
32   private final String longName;
33   private final List<NetworkAdapter> networkAdapters;
34 
35   public VAppExtendedInfo(String id, URI href, String name, List<String> tags, String longName,
36           List<NetworkAdapter> networkAdapters) {
37      this.id = id;
38      this.href = href;
39      this.name = name;
40      this.tags = tags;
41      this.longName = longName;
42      this.networkAdapters = networkAdapters;
43   }
44 
45   public int compareTo(VAppExtendedInfo that) {
46      return (this == that) ? 0 : getHref().compareTo(that.getHref());
47   }
48 
49   public String getId() {
50      return id;
51   }
52 
53   public URI getHref() {
54      return href;
55   }
56 
57   public String getName() {
58      return name;
59   }
60 
61   public List<String> getTags() {
62      return tags;
63   }
64 
65   public String getLongName() {
66      return longName;
67   }
68 
69   public List<NetworkAdapter> getNetworkAdapters() {
70      return networkAdapters;
71   }
72 
73   @Override
74   public int hashCode() {
75      final int prime = 31;
76      int result = 1;
77      result = prime * result + ((href == null) ? 0 : href.hashCode());
78      result = prime * result + ((id == null) ? 0 : id.hashCode());
79      result = prime * result + ((name == null) ? 0 : name.hashCode());
80      result = prime * result + ((longName == null) ? 0 : longName.hashCode());
81      result = prime * result + ((tags == null) ? 0 : tags.hashCode());
82      result = prime * result + ((networkAdapters == null) ? 0 : networkAdapters.hashCode());
83      return result;
84   }
85 
86   @Override
87   public boolean equals(Object obj) {
88      if (this == obj)
89         return true;
90      if (obj == null)
91         return false;
92      if (getClass() != obj.getClass())
93         return false;
94      VAppExtendedInfo other = (VAppExtendedInfo) obj;
95      if (href == null) {
96         if (other.href != null)
97            return false;
98      } else if (!href.equals(other.href))
99         return false;
100      if (id == null) {
101         if (other.id != null)
102            return false;
103      } else if (!id.equals(other.id))
104         return false;
105      if (name == null) {
106         if (other.name != null)
107            return false;
108      } else if (!name.equals(other.name))
109         return false;
110      if (tags == null) {
111         if (other.tags != null)
112            return false;
113      } else if (!tags.equals(other.tags))
114         return false;
115      if (networkAdapters == null) {
116         if (other.networkAdapters != null)
117            return false;
118      } else if (!networkAdapters.equals(other.networkAdapters))
119         return false;
120      return true;
121   }
122 
123   @Override
124   public String toString() {
125      return "[href=" + href + ", id=" + id + ", name=" + name + ", long name=" + longName
126          + ", tags=" + tags.toString() + ", network adapters=" + networkAdapters.toString() + "]";
127   }
128}

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