EMMA Coverage Report (generated Mon Oct 17 05:41:20 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 * 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.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