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

COVERAGE SUMMARY FOR SOURCE FILE [VLANInfo.java]

nameclass, %method, %block, %line, %
VLANInfo.java100% (2/2)50%  (7/14)29%  (82/279)32%  (22/69)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VLANInfo$Builder100% (1/1)71%  (5/7)20%  (28/142)22%  (8/37)
equals (Object): boolean 0%   (0/1)0%   (0/69)0%   (0/23)
hashCode (): int 0%   (0/1)0%   (0/45)0%   (0/6)
VLANInfo$Builder (): void 100% (1/1)100% (3/3)100% (1/1)
build (): VLANInfo 100% (1/1)100% (10/10)100% (1/1)
name (String): VLANInfo$Builder 100% (1/1)100% (5/5)100% (2/2)
user (String): VLANInfo$Builder 100% (1/1)100% (5/5)100% (2/2)
uuid (String): VLANInfo$Builder 100% (1/1)100% (5/5)100% (2/2)
     
class VLANInfo100% (1/1)29%  (2/7)39%  (54/137)44%  (14/32)
getName (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getUser (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getUuid (): String 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/32)0%   (0/5)
toString (): String 0%   (0/1)0%   (0/22)0%   (0/1)
equals (Object): boolean 100% (1/1)62%  (33/53)50%  (9/18)
VLANInfo (String, String, String): void 100% (1/1)100% (21/21)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.cloudsigma.domain;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23import org.jclouds.javax.annotation.Nullable;
24 
25/**
26 * 
27 * @author Adrian Cole
28 */
29public class VLANInfo {
30   public static class Builder {
31      protected String uuid;
32      protected String name;
33      protected String user;
34 
35      public Builder uuid(String uuid) {
36         this.uuid = uuid;
37         return this;
38      }
39 
40      public Builder name(String name) {
41         this.name = name;
42         return this;
43      }
44 
45      public Builder user(String user) {
46         this.user = user;
47         return this;
48      }
49 
50      public VLANInfo build() {
51         return new VLANInfo(uuid, name, user);
52      }
53 
54      @Override
55      public int hashCode() {
56         final int prime = 31;
57         int result = 1;
58         result = prime * result + ((name == null) ? 0 : name.hashCode());
59         result = prime * result + ((user == null) ? 0 : user.hashCode());
60         result = prime * result + ((uuid == null) ? 0 : uuid.hashCode());
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         Builder other = (Builder) obj;
73         if (name == null) {
74            if (other.name != null)
75               return false;
76         } else if (!name.equals(other.name))
77            return false;
78         if (user == null) {
79            if (other.user != null)
80               return false;
81         } else if (!user.equals(other.user))
82            return false;
83         if (uuid == null) {
84            if (other.uuid != null)
85               return false;
86         } else if (!uuid.equals(other.uuid))
87            return false;
88         return true;
89      }
90   }
91 
92   @Nullable
93   protected final String uuid;
94   protected final String name;
95   protected final String user;
96 
97   public VLANInfo(String uuid, String name, String user) {
98      this.uuid = checkNotNull(uuid, "uuid");
99      this.name = checkNotNull(name, "name");
100      this.user = checkNotNull(user, "user");
101   }
102 
103   /**
104    * 
105    * @return uuid of the vlan.
106    */
107   @Nullable
108   public String getUuid() {
109      return uuid;
110   }
111 
112   /**
113    * 
114    * @return name of the vlan
115    */
116   public String getName() {
117      return name;
118   }
119 
120   /**
121    * 
122    * @return user owning the vlan
123    */
124   public String getUser() {
125      return user;
126   }
127 
128   @Override
129   public int hashCode() {
130      final int prime = 31;
131      int result = 1;
132      result = prime * result + ((name == null) ? 0 : name.hashCode());
133      result = prime * result + ((user == null) ? 0 : user.hashCode());
134      return result;
135   }
136 
137   @Override
138   public boolean equals(Object obj) {
139      if (this == obj)
140         return true;
141      if (obj == null)
142         return false;
143      if (getClass() != obj.getClass())
144         return false;
145      VLANInfo other = (VLANInfo) obj;
146      if (name == null) {
147         if (other.name != null)
148            return false;
149      } else if (!name.equals(other.name))
150         return false;
151      if (user == null) {
152         if (other.user != null)
153            return false;
154      } else if (!user.equals(other.user))
155         return false;
156 
157      return true;
158   }
159 
160   @Override
161   public String toString() {
162      return "[uuid=" + uuid + ", name=" + name + ", user=" + user + "]";
163   }
164 
165}

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