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

COVERAGE SUMMARY FOR SOURCE FILE [VCloudNetworkSection.java]

nameclass, %method, %block, %line, %
VCloudNetworkSection.java100% (1/1)50%  (3/6)13%  (17/132)20%  (6/30)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class VCloudNetworkSection100% (1/1)50%  (3/6)13%  (17/132)20%  (6/30)
equals (Object): boolean 0%   (0/1)0%   (0/55)0%   (0/18)
hashCode (): int 0%   (0/1)0%   (0/33)0%   (0/5)
toString (): String 0%   (0/1)0%   (0/27)0%   (0/1)
VCloudNetworkSection (String, URI, String, Iterable): void 100% (1/1)100% (11/11)100% (4/4)
getHref (): URI 100% (1/1)100% (3/3)100% (1/1)
getType (): String 100% (1/1)100% (3/3)100% (1/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.vcloud.domain.ovf;
20 
21import java.net.URI;
22 
23import org.jclouds.ovf.Network;
24import org.jclouds.ovf.NetworkSection;
25 
26/**
27 * VCloud extension
28 */
29public class VCloudNetworkSection extends NetworkSection {
30   protected final String type;
31   protected final URI href;
32 
33   public VCloudNetworkSection(String type, URI href, String info, Iterable<Network> networks) {
34      super(info, networks);
35      this.type = type;
36      this.href = href;
37   }
38 
39   public String getType() {
40      return type;
41   }
42 
43   public URI getHref() {
44      return href;
45   }
46 
47   @Override
48   public int hashCode() {
49      final int prime = 31;
50      int result = super.hashCode();
51      result = prime * result + ((href == null) ? 0 : href.hashCode());
52      result = prime * result + ((type == null) ? 0 : type.hashCode());
53      return result;
54   }
55 
56   @Override
57   public boolean equals(Object obj) {
58      if (this == obj)
59         return true;
60      if (!super.equals(obj))
61         return false;
62      if (getClass() != obj.getClass())
63         return false;
64      VCloudNetworkSection other = (VCloudNetworkSection) obj;
65      if (href == null) {
66         if (other.href != null)
67            return false;
68      } else if (!href.equals(other.href))
69         return false;
70      if (type == null) {
71         if (other.type != null)
72            return false;
73      } else if (!type.equals(other.type))
74         return false;
75      return true;
76   }
77 
78   @Override
79   public String toString() {
80      return "[href=" + getHref() + ", type=" + getType() + ", info=" + getInfo() + ", networks=" + getNetworks() + "]";
81   }
82}

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