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

COVERAGE SUMMARY FOR SOURCE FILE [JobState.java]

nameclass, %method, %block, %line, %
JobState.java100% (1/1)83%  (5/6)95%  (142/149)93%  (15/16)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class JobState100% (1/1)83%  (5/6)95%  (142/149)93%  (15/16)
valueOf (String): JobState 0%   (0/1)0%   (0/5)0%   (0/1)
fromValue (String): JobState 100% (1/1)92%  (24/26)75%  (3/4)
<static initializer> 100% (1/1)100% (100/100)100% (7/7)
JobState (String, int, String, String): void 100% (1/1)100% (11/11)100% (4/4)
toString (): String 100% (1/1)100% (3/3)100% (1/1)
values (): JobState [] 100% (1/1)100% (4/4)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.gogrid.domain;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22 
23/**
24 * @author Oleksiy Yarmula
25 */
26public enum JobState {
27 
28   QUEUED("Queued", "Change request is new to the system."), PROCESSING("Processing",
29            "Change request is is transient state...Processing."), SUCCEEDED("Succeeded",
30            "Change request has succeeded."), FAILED("Failed", "Change request has failed."), CANCELED(
31            "Canceled", "Change request has been canceled."), FATAL("Fatal",
32            "Change request had Fatal or Unrecoverable Failure"), CREATED("Created",
33            "Change request is created but not queued yet"), UNRECOGNIZED("Unknown",
34            "The state is unknown to JClouds");
35 
36   String name;
37   String description;
38 
39   JobState(String name, String description) {
40      this.name = name;
41      this.description = description;
42   }
43 
44   @Override
45   public String toString() {
46      return name;
47   }
48 
49   public static JobState fromValue(String state) {
50      for (JobState jobState : values()) {
51         if (jobState.name.equals(checkNotNull(state)))
52            return jobState;
53      }
54      return UNRECOGNIZED;
55   }
56 
57}

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