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