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

COVERAGE SUMMARY FOR SOURCE FILE [TasksListImpl.java]

nameclass, %method, %block, %line, %
TasksListImpl.java100% (1/1)60%  (3/5)15%  (15/100)21%  (6/29)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TasksListImpl100% (1/1)60%  (3/5)15%  (15/100)21%  (6/29)
equals (Object): boolean 0%   (0/1)0%   (0/53)0%   (0/18)
hashCode (): int 0%   (0/1)0%   (0/32)0%   (0/5)
TasksListImpl (URI, SortedSet): void 100% (1/1)100% (9/9)100% (4/4)
getLocation (): URI 100% (1/1)100% (3/3)100% (1/1)
getTasks (): SortedSet 100% (1/1)100% (3/3)100% (1/1)

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;
22import java.util.SortedSet;
23 
24import org.jclouds.vcloud.domain.Task;
25import org.jclouds.vcloud.domain.TasksList;
26 
27/**
28 * Locations of resources in vCloud
29 * 
30 * @author Adrian Cole
31 * 
32 */
33public class TasksListImpl implements TasksList {
34   private final SortedSet<Task> tasks;
35 
36   private final URI id;
37   /** The serialVersionUID */
38   private static final long serialVersionUID = 8464716396538298809L;
39 
40   public TasksListImpl(URI id, SortedSet<Task> tasks) {
41      this.id = id;
42      this.tasks = tasks;
43   }
44 
45   @Override
46   public SortedSet<Task> getTasks() {
47      return tasks;
48   }
49 
50   @Override
51   public URI getLocation() {
52      return id;
53   }
54 
55   @Override
56   public int hashCode() {
57      final int prime = 31;
58      int result = 1;
59      result = prime * result + ((id == null) ? 0 : id.hashCode());
60      result = prime * result + ((tasks == null) ? 0 : tasks.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      TasksListImpl other = (TasksListImpl) obj;
73      if (id == null) {
74         if (other.id != null)
75            return false;
76      } else if (!id.equals(other.id))
77         return false;
78      if (tasks == null) {
79         if (other.tasks != null)
80            return false;
81      } else if (!tasks.equals(other.tasks))
82         return false;
83      return true;
84   }
85 
86}

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