/** * <copyright> * </copyright> * * $Id$ */ package workflow; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * <!-- begin-user-doc --> * A representation of the literals of the enumeration '<em><b>TASK STATUS</b></em>', * and utility methods for working with them. * <!-- end-user-doc --> * @see workflow.WorkflowPackage#getTASK_STATUS() * @model * @generated */ public enum TASK_STATUS implements Enumerator { /** * The '<em><b>STARTING</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #STARTING_VALUE * @generated * @ordered */ STARTING(0, "STARTING", "STARTING"), /** * The '<em><b>RUNNING</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #RUNNING_VALUE * @generated * @ordered */ RUNNING(1, "RUNNING", "RUNNING"), /** * The '<em><b>STOPPING</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #STOPPING_VALUE * @generated * @ordered */ STOPPING(2, "STOPPING", "STOPPING"), /** * The '<em><b>STOPPED</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #STOPPED_VALUE * @generated * @ordered */ STOPPED(3, "STOPPED", "STOPPED"), /** * The '<em><b>FAILED</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #FAILED_VALUE * @generated * @ordered */ FAILED(4, "FAILED", "FAILED"), /** * The '<em><b>UNKNOWN</b></em>' literal object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #UNKNOWN_VALUE * @generated * @ordered */ UNKNOWN(5, "UNKNOWN", "UNKNOWN"); /** * The '<em><b>STARTING</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>STARTING</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #STARTING * @model * @generated * @ordered */ public static final int STARTING_VALUE = 0; /** * The '<em><b>RUNNING</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>RUNNING</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #RUNNING * @model * @generated * @ordered */ public static final int RUNNING_VALUE = 1; /** * The '<em><b>STOPPING</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>STOPPING</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #STOPPING * @model * @generated * @ordered */ public static final int STOPPING_VALUE = 2; /** * The '<em><b>STOPPED</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>STOPPED</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #STOPPED * @model * @generated * @ordered */ public static final int STOPPED_VALUE = 3; /** * The '<em><b>FAILED</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>FAILED</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #FAILED * @model * @generated * @ordered */ public static final int FAILED_VALUE = 4; /** * The '<em><b>UNKNOWN</b></em>' literal value. * <!-- begin-user-doc --> * <p> * If the meaning of '<em><b>UNKNOWN</b></em>' literal object isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @see #UNKNOWN * @model * @generated * @ordered */ public static final int UNKNOWN_VALUE = 5; /** * An array of all the '<em><b>TASK STATUS</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static final TASK_STATUS[] VALUES_ARRAY = new TASK_STATUS[] { STARTING, RUNNING, STOPPING, STOPPED, FAILED, UNKNOWN, }; /** * A public read-only list of all the '<em><b>TASK STATUS</b></em>' enumerators. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static final List<TASK_STATUS> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>TASK STATUS</b></em>' literal with the specified literal value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TASK_STATUS get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TASK_STATUS result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>TASK STATUS</b></em>' literal with the specified name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TASK_STATUS getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TASK_STATUS result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>TASK STATUS</b></em>' literal with the specified integer value. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static TASK_STATUS get(int value) { switch (value) { case STARTING_VALUE: return STARTING; case RUNNING_VALUE: return RUNNING; case STOPPING_VALUE: return STOPPING; case STOPPED_VALUE: return STOPPED; case FAILED_VALUE: return FAILED; case UNKNOWN_VALUE: return UNKNOWN; } return null; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final int value; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String name; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private final String literal; /** * Only this class can construct instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private TASK_STATUS(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public int getValue() { return value; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public String toString() { return literal; } } //TASK_STATUS