/** */ 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 'Loser Type', * and utility methods for working with them. * * * * * @see rba.core.RBACorePackage#getLoserType() * @model * @generated */ public enum LoserType implements Enumerator { /** * The 'NEVER GIVEUP' literal object. * * * @see #NEVER_GIVEUP_VALUE * @generated * @ordered */ NEVER_GIVEUP(0, "NEVER_GIVEUP", "NEVER_GIVEUP"), /** * The 'GOOD LOSER' literal object. * * * @see #GOOD_LOSER_VALUE * @generated * @ordered */ GOOD_LOSER(0, "GOOD_LOSER", "GOOD_LOSER"), /** * The 'DO NOT GIVEUP UNTIL WIN' literal object. * * * @see #DO_NOT_GIVEUP_UNTIL_WIN_VALUE * @generated * @ordered */ DO_NOT_GIVEUP_UNTIL_WIN(0, "DO_NOT_GIVEUP_UNTIL_WIN", "DO_NOT_GIVEUP_UNTIL_WIN"); /** * The 'NEVER GIVEUP' literal value. * * * * * * @see #NEVER_GIVEUP * @model * @generated * @ordered */ public static final int NEVER_GIVEUP_VALUE = 0; /** * The 'GOOD LOSER' literal value. * * * * * * @see #GOOD_LOSER * @model * @generated * @ordered */ public static final int GOOD_LOSER_VALUE = 0; /** * The 'DO NOT GIVEUP UNTIL WIN' literal value. * * * * * * @see #DO_NOT_GIVEUP_UNTIL_WIN * @model * @generated * @ordered */ public static final int DO_NOT_GIVEUP_UNTIL_WIN_VALUE = 0; /** * An array of all the 'Loser Type' enumerators. * * * @generated */ private static final LoserType[] VALUES_ARRAY = new LoserType[] { NEVER_GIVEUP, GOOD_LOSER, DO_NOT_GIVEUP_UNTIL_WIN, }; /** * A public read-only list of all the 'Loser Type' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Loser Type' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static LoserType get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { LoserType result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Loser Type' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static LoserType getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { LoserType result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Loser Type' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static LoserType get(int value) { switch (value) { case NEVER_GIVEUP_VALUE: return NEVER_GIVEUP; } 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 LoserType(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; } } //LoserType