EMMA Coverage Report (generated Wed Jun 22 19:47:49 EDT 2011)
[all classes][org.jclouds.vcloud.domain.internal]

COVERAGE SUMMARY FOR SOURCE FILE [VCloudExpressVAppTemplateImpl.java]

nameclass, %method, %block, %line, %
VCloudExpressVAppTemplateImpl.java100% (1/1)33%  (2/6)41%  (50/123)47%  (14/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VCloudExpressVAppTemplateImpl100% (1/1)33%  (2/6)41%  (50/123)47%  (14/30)
getDescription (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getStatus (): Status 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/33)0%   (0/5)
toString (): String 0%   (0/1)0%   (0/17)0%   (0/1)
equals (Object): boolean 100% (1/1)69%  (38/55)56%  (10/18)
VCloudExpressVAppTemplateImpl (String, URI, String, Status): void 100% (1/1)100% (12/12)100% (4/4)

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.internal;
20 
21import java.net.URI;
22 
23import javax.annotation.Nullable;
24 
25import org.jclouds.vcloud.VCloudExpressMediaType;
26import org.jclouds.vcloud.domain.Status;
27import org.jclouds.vcloud.domain.VCloudExpressVAppTemplate;
28 
29/**
30 * 
31 * @author Adrian Cole
32 * 
33 */
34public class VCloudExpressVAppTemplateImpl extends ReferenceTypeImpl implements VCloudExpressVAppTemplate {
35 
36   /** The serialVersionUID */
37   private static final long serialVersionUID = 8464716396538298809L;
38   private final String description;
39   private final Status status;
40 
41   public VCloudExpressVAppTemplateImpl(String name, URI id, @Nullable String description, @Nullable Status status) {
42      super(name, VCloudExpressMediaType.VAPPTEMPLATE_XML, id);
43      this.description = description;
44      this.status = status;
45   }
46 
47   @Override
48   public String getDescription() {
49      return description;
50   }
51 
52   public Status getStatus() {
53      return status;
54   }
55 
56   @Override
57   public int hashCode() {
58      final int prime = 31;
59      int result = super.hashCode();
60      result = prime * result + ((description == null) ? 0 : description.hashCode());
61      result = prime * result + ((status == null) ? 0 : status.hashCode());
62      return result;
63   }
64 
65   @Override
66   public boolean equals(Object obj) {
67      if (this == obj)
68         return true;
69      if (!super.equals(obj))
70         return false;
71      if (getClass() != obj.getClass())
72         return false;
73      VCloudExpressVAppTemplateImpl other = (VCloudExpressVAppTemplateImpl) obj;
74      if (description == null) {
75         if (other.description != null)
76            return false;
77      } else if (!description.equals(other.description))
78         return false;
79      if (status == null) {
80         if (other.status != null)
81            return false;
82      } else if (!status.equals(other.status))
83         return false;
84      return true;
85   }
86 
87   @Override
88   public String toString() {
89      return "VAppTemplateImpl [description=" + description + ", status=" + status + "]";
90   }
91 
92}

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