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

COVERAGE SUMMARY FOR SOURCE FILE [VAppTemplateImpl.java]

nameclass, %method, %block, %line, %
VAppTemplateImpl.java100% (1/1)33%  (2/6)36%  (44/123)43%  (13/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VAppTemplateImpl100% (1/1)33%  (2/6)36%  (44/123)43%  (13/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)58%  (32/55)50%  (9/18)
VAppTemplateImpl (String, URI, String, Status): void 100% (1/1)100% (12/12)100% (4/4)

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

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