EMMA Coverage Report (generated Wed Aug 10 12:30:04 EDT 2011)
[all classes][org.jclouds.deltacloud.domain]

COVERAGE SUMMARY FOR SOURCE FILE [TransitionAutomatically.java]

nameclass, %method, %block, %line, %
TransitionAutomatically.java100% (1/1)80%  (4/5)78%  (62/80)68%  (14.9/22)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class TransitionAutomatically100% (1/1)80%  (4/5)78%  (62/80)68%  (14.9/22)
getTo (): Instance$State 0%   (0/1)0%   (0/3)0%   (0/1)
equals (Object): boolean 100% (1/1)65%  (24/37)54%  (7/13)
hashCode (): int 100% (1/1)89%  (17/19)97%  (3.9/4)
TransitionAutomatically (Instance$State): void 100% (1/1)100% (9/9)100% (3/3)
toString (): String 100% (1/1)100% (12/12)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.deltacloud.domain;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23/**
24 * 
25 * @author Adrian Cole
26 */
27public class TransitionAutomatically implements Transition {
28   private final Instance.State to;
29 
30   public TransitionAutomatically(Instance.State to) {
31      this.to = checkNotNull(to, "to");
32   }
33 
34   public Instance.State getTo() {
35      return to;
36   }
37 
38   @Override
39   public String toString() {
40      return "[to=" + to + "]";
41   }
42 
43   @Override
44   public int hashCode() {
45      final int prime = 31;
46      int result = 1;
47      result = prime * result + ((to == null) ? 0 : to.hashCode());
48      return result;
49   }
50 
51   @Override
52   public boolean equals(Object obj) {
53      if (this == obj)
54         return true;
55      if (obj == null)
56         return false;
57      if (getClass() != obj.getClass())
58         return false;
59      TransitionAutomatically other = (TransitionAutomatically) obj;
60      if (to == null) {
61         if (other.to != null)
62            return false;
63      } else if (!to.equals(other.to))
64         return false;
65      return true;
66   }
67}

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