EMMA Coverage Report (generated Fri Apr 27 15:03:37 EDT 2012)
[all classes][org.jclouds.ec2.domain]

COVERAGE SUMMARY FOR SOURCE FILE [PasswordData.java]

nameclass, %method, %block, %line, %
PasswordData.java67%  (2/3)44%  (7/16)20%  (46/232)36%  (13/36)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PasswordData100% (1/1)33%  (3/9)12%  (23/194)32%  (8/25)
equals (Object): boolean 0%   (0/1)0%   (0/79)0%   (0/8)
getInstanceId (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getRequestId (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getTimestamp (): Date 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/50)0%   (0/5)
toString (): String 0%   (0/1)0%   (0/33)0%   (0/1)
PasswordData (String, String, Date, String): void 100% (1/1)100% (15/15)100% (6/6)
builder (): PasswordData$Builder 100% (1/1)100% (5/5)100% (1/1)
getPasswordData (): String 100% (1/1)100% (3/3)100% (1/1)
     
class PasswordData$10%   (0/1)100% (0/0)100% (0/0)100% (0/0)
     
class PasswordData$Builder100% (1/1)57%  (4/7)61%  (23/38)45%  (5/11)
instanceId (String): PasswordData$Builder 0%   (0/1)0%   (0/5)0%   (0/2)
requestId (String): PasswordData$Builder 0%   (0/1)0%   (0/5)0%   (0/2)
timestamp (Date): PasswordData$Builder 0%   (0/1)0%   (0/5)0%   (0/2)
PasswordData$Builder (): void 100% (1/1)100% (3/3)100% (1/1)
PasswordData$Builder (PasswordData$1): void 100% (1/1)100% (3/3)100% (1/1)
build (): PasswordData 100% (1/1)100% (12/12)100% (1/1)
passwordData (String): PasswordData$Builder 100% (1/1)100% (5/5)100% (2/2)

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.ec2.domain;
20 
21import java.util.Date;
22 
23/**
24 * Holds the encrypted Windows Administrator password for an instance.
25 *
26 * @author Richard Downer
27 */
28public class PasswordData {
29 
30   public static Builder builder() {
31      return new Builder();
32   }
33 
34   public static class Builder {
35 
36      private String requestId;
37      private String instanceId;
38      private Date timestamp;
39      private String passwordData;
40 
41      private Builder() {}
42 
43      public Builder requestId(String requestId) {
44         this.requestId = requestId;
45         return this;
46      }
47 
48      public Builder instanceId(String instanceId) {
49         this.instanceId = instanceId;
50         return this;
51      }
52 
53      public Builder timestamp(Date timestamp) {
54         this.timestamp = timestamp;
55         return this;
56      }
57 
58      public Builder passwordData(String passwordData) {
59         this.passwordData = passwordData;
60         return this;
61      }
62 
63      public PasswordData build() {
64         return new PasswordData(requestId, instanceId, timestamp, passwordData);
65      }
66   }
67 
68   private String requestId;
69   private String instanceId;
70   private Date timestamp;
71   private String passwordData;
72 
73   public PasswordData(String requestId, String instanceId, Date timestamp, String passwordData) {
74      this.requestId = requestId;
75      this.instanceId = instanceId;
76      this.timestamp = timestamp;
77      this.passwordData = passwordData;
78   }
79 
80   public String getRequestId() {
81      return requestId;
82   }
83 
84   public String getInstanceId() {
85      return instanceId;
86   }
87 
88   public Date getTimestamp() {
89      return timestamp;
90   }
91 
92   public String getPasswordData() {
93      return passwordData;
94   }
95 
96   @Override
97   public boolean equals(Object o) {
98      if (this == o) return true;
99      if (o == null || getClass() != o.getClass()) return false;
100 
101      PasswordData that = (PasswordData) o;
102 
103      if (instanceId != null ? !instanceId.equals(that.instanceId) : that.instanceId != null) return false;
104      if (passwordData != null ? !passwordData.equals(that.passwordData) : that.passwordData != null) return false;
105      if (requestId != null ? !requestId.equals(that.requestId) : that.requestId != null) return false;
106      if (timestamp != null ? !timestamp.equals(that.timestamp) : that.timestamp != null) return false;
107 
108      return true;
109   }
110 
111   @Override
112   public int hashCode() {
113      int result = requestId != null ? requestId.hashCode() : 0;
114      result = 31 * result + (instanceId != null ? instanceId.hashCode() : 0);
115      result = 31 * result + (timestamp != null ? timestamp.hashCode() : 0);
116      result = 31 * result + (passwordData != null ? passwordData.hashCode() : 0);
117      return result;
118   }
119 
120   @Override
121   public String toString() {
122      return "PasswordData{" +
123         "requestId='" + requestId + '\'' +
124         ", instanceId='" + instanceId + '\'' +
125         ", timestamp=" + timestamp +
126         ", passwordData='" + passwordData + '\'' +
127         '}';
128   }
129}

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