| /** |
| * Copyright (c) 2010, 2012 Ericsson |
| * |
| * All rights reserved. This program and the accompanying materials are |
| * made available under the terms of the Eclipse Public License v1.0 which |
| * accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Description: |
| * |
| * Contributors: |
| * Alvaro Sanchez-Leon - Initial API and implementation |
| * |
| */ |
| package org.eclipse.mylyn.reviews.r4e.core.model; |
| |
| 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>R4E Anomaly State</b></em>', and |
| * utility methods for working with them. <!-- end-user-doc --> |
| * @see org.eclipse.mylyn.reviews.r4e.core.model.RModelPackage#getR4EAnomalyState() |
| * @model |
| * @generated |
| */ |
| public enum R4EAnomalyState implements Enumerator { |
| /** |
| * The '<em><b>Created</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #CREATED_VALUE |
| * @generated |
| * @ordered |
| */ |
| CREATED(5, "Created", "CREATED"), /** |
| * The '<em><b>Assigned</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ASSIGNED_VALUE |
| * @generated |
| * @ordered |
| */ |
| ASSIGNED(4, "Assigned", "ASSIGNED"), /** |
| * The '<em><b>Accepted</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ACCEPTED_VALUE |
| * @generated |
| * @ordered |
| */ |
| ACCEPTED(0, "Accepted", "ACCEPTED"), /** |
| * The '<em><b>Fixed</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #FIXED_VALUE |
| * @generated |
| * @ordered |
| */ |
| FIXED(7, "Fixed", "FIXED"), /** |
| * The '<em><b>Duplicated</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DUPLICATED_VALUE |
| * @generated |
| * @ordered |
| */ |
| DUPLICATED(1, "Duplicated", "DUPLICATED"), /** |
| * The '<em><b>Rejected</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #REJECTED_VALUE |
| * @generated |
| * @ordered |
| */ |
| REJECTED(2, "Rejected", "REJECTED"), /** |
| * The '<em><b>Deferred</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DEFERRED_VALUE |
| * @generated |
| * @ordered |
| */ |
| DEFERRED(3, "Deferred", "DEFERRED"), /** |
| * The '<em><b>Verified</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #VERIFIED_VALUE |
| * @generated |
| * @ordered |
| */ |
| VERIFIED(6, "Verified", "VERIFIED"); |
| |
| /** |
| * The '<em><b>Created</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Created</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #CREATED |
| * @model name="Created" literal="CREATED" |
| * @generated |
| * @ordered |
| */ |
| public static final int CREATED_VALUE = 5; |
| |
| /** |
| * The '<em><b>Assigned</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Assigned</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ASSIGNED |
| * @model name="Assigned" literal="ASSIGNED" |
| * @generated |
| * @ordered |
| */ |
| public static final int ASSIGNED_VALUE = 4; |
| |
| /** |
| * The '<em><b>Accepted</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Accepted</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ACCEPTED |
| * @model name="Accepted" literal="ACCEPTED" |
| * @generated |
| * @ordered |
| */ |
| public static final int ACCEPTED_VALUE = 0; |
| |
| /** |
| * The '<em><b>Fixed</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Fixed</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #FIXED |
| * @model name="Fixed" literal="FIXED" |
| * @generated |
| * @ordered |
| */ |
| public static final int FIXED_VALUE = 7; |
| |
| /** |
| * The '<em><b>Duplicated</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Duplicated</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #DUPLICATED |
| * @model name="Duplicated" literal="DUPLICATED" |
| * @generated |
| * @ordered |
| */ |
| public static final int DUPLICATED_VALUE = 1; |
| |
| /** |
| * The '<em><b>Rejected</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Rejected</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #REJECTED |
| * @model name="Rejected" literal="REJECTED" |
| * @generated |
| * @ordered |
| */ |
| public static final int REJECTED_VALUE = 2; |
| |
| /** |
| * The '<em><b>Deferred</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Deferred</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #DEFERRED |
| * @model name="Deferred" literal="DEFERRED" |
| * @generated |
| * @ordered |
| */ |
| public static final int DEFERRED_VALUE = 3; |
| |
| /** |
| * The '<em><b>Verified</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Verified</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #VERIFIED |
| * @model name="Verified" literal="VERIFIED" |
| * @generated |
| * @ordered |
| */ |
| public static final int VERIFIED_VALUE = 6; |
| |
| /** |
| * An array of all the '<em><b>R4E Anomaly State</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc |
| * --> |
| * |
| * @generated |
| */ |
| private static final R4EAnomalyState[] VALUES_ARRAY = new R4EAnomalyState[] { |
| CREATED, |
| ASSIGNED, |
| ACCEPTED, |
| FIXED, |
| DUPLICATED, |
| REJECTED, |
| DEFERRED, |
| VERIFIED, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>R4E Anomaly State</b></em>' enumerators. |
| * <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * @generated |
| */ |
| public static final List<R4EAnomalyState> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>R4E Anomaly State</b></em>' literal with the specified literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static R4EAnomalyState get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| R4EAnomalyState result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>R4E Anomaly State</b></em>' literal with the specified name. |
| * <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * @generated |
| */ |
| public static R4EAnomalyState getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| R4EAnomalyState result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>R4E Anomaly State</b></em>' literal with the specified integer value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static R4EAnomalyState get(int value) { |
| switch (value) { |
| case CREATED_VALUE: return CREATED; |
| case ASSIGNED_VALUE: return ASSIGNED; |
| case ACCEPTED_VALUE: return ACCEPTED; |
| case FIXED_VALUE: return FIXED; |
| case DUPLICATED_VALUE: return DUPLICATED; |
| case REJECTED_VALUE: return REJECTED; |
| case DEFERRED_VALUE: return DEFERRED; |
| case VERIFIED_VALUE: return VERIFIED; |
| } |
| 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 R4EAnomalyState(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; |
| } |
| |
| } //R4EAnomalyState |