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 [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 * 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;
22import java.util.SortedSet;
23 
24import org.jclouds.trmk.vcloud_0_8.domain.Task;
25import org.jclouds.trmk.vcloud_0_8.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   private final URI id;
36 
37   public TasksListImpl(URI id, SortedSet<Task> tasks) {
38      this.id = id;
39      this.tasks = tasks;
40   }
41 
42   @Override
43   public SortedSet<Task> getTasks() {
44      return tasks;
45   }
46 
47   @Override
48   public URI getLocation() {
49      return id;
50   }
51 
52   @Override
53   public int hashCode() {
54      final int prime = 31;
55      int result = 1;
56      result = prime * result + ((id == null) ? 0 : id.hashCode());
57      result = prime * result + ((tasks == null) ? 0 : tasks.hashCode());
58      return result;
59   }
60 
61   @Override
62   public boolean equals(Object obj) {
63      if (this == obj)
64         return true;
65      if (obj == null)
66         return false;
67      if (getClass() != obj.getClass())
68         return false;
69      TasksListImpl other = (TasksListImpl) obj;
70      if (id == null) {
71         if (other.id != null)
72            return false;
73      } else if (!id.equals(other.id))
74         return false;
75      if (tasks == null) {
76         if (other.tasks != null)
77            return false;
78      } else if (!tasks.equals(other.tasks))
79         return false;
80      return true;
81   }
82 
83}

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