/** */ package rba.core; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * * A representation of the literals of the enumeration 'Arbitration Policy', * and utility methods for working with them. * * * * * @see rba.core.RBACorePackage#getArbitrationPolicy() * @model * @generated */ public enum ArbitrationPolicy implements Enumerator { /** * The 'DEFAULT' literal object. * * * @see #DEFAULT_VALUE * @generated * @ordered */ DEFAULT(0, "DEFAULT", "DEFAULT"), /** * The 'FIRST COME FIRST' literal object. * * * @see #FIRST_COME_FIRST_VALUE * @generated * @ordered */ FIRST_COME_FIRST(4, "FIRST_COME_FIRST", "FIRST_COME_FIRST"), /** * The 'LAST COME FIRST' literal object. * * * @see #LAST_COME_FIRST_VALUE * @generated * @ordered */ LAST_COME_FIRST(1, "LAST_COME_FIRST", "LAST_COME_FIRST"), /** * The 'PRIORITY FIRST COME FIRST' literal object. * * * @see #PRIORITY_FIRST_COME_FIRST_VALUE * @generated * @ordered */ PRIORITY_FIRST_COME_FIRST(5, "PRIORITY_FIRST_COME_FIRST", "PRIORITY_FIRST_COME_FIRST"), /** * The 'PRIORITY LAST COME FIRST' literal object. * * * @see #PRIORITY_LAST_COME_FIRST_VALUE * @generated * @ordered */ PRIORITY_LAST_COME_FIRST(6, "PRIORITY_LAST_COME_FIRST", "PRIORITY_LAST_COME_FIRST"); /** * The 'DEFAULT' literal value. * * * * * * @see #DEFAULT * @model * @generated * @ordered */ public static final int DEFAULT_VALUE = 0; /** * The 'FIRST COME FIRST' literal value. * * * * * * @see #FIRST_COME_FIRST * @model * @generated * @ordered */ public static final int FIRST_COME_FIRST_VALUE = 4; /** * The 'LAST COME FIRST' literal value. * * * * * * @see #LAST_COME_FIRST * @model * @generated * @ordered */ public static final int LAST_COME_FIRST_VALUE = 1; /** * The 'PRIORITY FIRST COME FIRST' literal value. * * * * * * @see #PRIORITY_FIRST_COME_FIRST * @model * @generated * @ordered */ public static final int PRIORITY_FIRST_COME_FIRST_VALUE = 5; /** * The 'PRIORITY LAST COME FIRST' literal value. * * * * * * @see #PRIORITY_LAST_COME_FIRST * @model * @generated * @ordered */ public static final int PRIORITY_LAST_COME_FIRST_VALUE = 6; /** * An array of all the 'Arbitration Policy' enumerators. * * * @generated */ private static final ArbitrationPolicy[] VALUES_ARRAY = new ArbitrationPolicy[] { DEFAULT, FIRST_COME_FIRST, LAST_COME_FIRST, PRIORITY_FIRST_COME_FIRST, PRIORITY_LAST_COME_FIRST, }; /** * A public read-only list of all the 'Arbitration Policy' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Arbitration Policy' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static ArbitrationPolicy get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ArbitrationPolicy result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Arbitration Policy' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static ArbitrationPolicy getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { ArbitrationPolicy result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Arbitration Policy' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static ArbitrationPolicy get(int value) { switch (value) { case DEFAULT_VALUE: return DEFAULT; case FIRST_COME_FIRST_VALUE: return FIRST_COME_FIRST; case LAST_COME_FIRST_VALUE: return LAST_COME_FIRST; case PRIORITY_FIRST_COME_FIRST_VALUE: return PRIORITY_FIRST_COME_FIRST; case PRIORITY_LAST_COME_FIRST_VALUE: return PRIORITY_LAST_COME_FIRST; } return null; } /** * * * @generated */ private final int value; /** * * * @generated */ private final String name; /** * * * @generated */ private final String literal; /** * Only this class can construct instances. * * * @generated */ private ArbitrationPolicy(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * * * @generated */ public int getValue() { return value; } /** * * * @generated */ public String getName() { return name; } /** * * * @generated */ public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * * * @generated */ @Override public String toString() { return literal; } } //ArbitrationPolicy