/** */ package TaxationWithRoot; 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 'Expense Purpose', * and utility methods for working with them. * * @see TaxationWithRoot.TaxationPackage#getExpense_Purpose() * @model * @generated */ public enum Expense_Purpose implements Enumerator { /** * The 'HOUSE CARE' literal object. * * * @see #HOUSE_CARE_VALUE * @generated * @ordered */ HOUSE_CARE(0, "HOUSE_CARE", "HOUSE_CARE"), /** * The 'CHILD CARE' literal object. * * * @see #CHILD_CARE_VALUE * @generated * @ordered */ CHILD_CARE(1, "CHILD_CARE", "CHILD_CARE"), /** * The 'DEPENDENCE CARE' literal object. * * * @see #DEPENDENCE_CARE_VALUE * @generated * @ordered */ DEPENDENCE_CARE(2, "DEPENDENCE_CARE", "DEPENDENCE_CARE"), /** * The 'OTHER' literal object. * * * @see #OTHER_VALUE * @generated * @ordered */ OTHER(3, "OTHER", "OTHER"), /** * The 'ALIMONY' literal object. * * * @see #ALIMONY_VALUE * @generated * @ordered */ ALIMONY(4, "ALIMONY", "ALIMONY"), /** * The 'RECURRENT DEPT' literal object. * * * @see #RECURRENT_DEPT_VALUE * @generated * @ordered */ RECURRENT_DEPT(5, "RECURRENT_DEPT", "RECURRENT_DEPT"); /** * The 'HOUSE CARE' literal value. * * * @see #HOUSE_CARE * @model * @generated * @ordered */ public static final int HOUSE_CARE_VALUE = 0; /** * The 'CHILD CARE' literal value. * * * @see #CHILD_CARE * @model * @generated * @ordered */ public static final int CHILD_CARE_VALUE = 1; /** * The 'DEPENDENCE CARE' literal value. * * * @see #DEPENDENCE_CARE * @model * @generated * @ordered */ public static final int DEPENDENCE_CARE_VALUE = 2; /** * The 'OTHER' literal value. * * * @see #OTHER * @model * @generated * @ordered */ public static final int OTHER_VALUE = 3; /** * The 'ALIMONY' literal value. * * * @see #ALIMONY * @model * @generated * @ordered */ public static final int ALIMONY_VALUE = 4; /** * The 'RECURRENT DEPT' literal value. * * * @see #RECURRENT_DEPT * @model * @generated * @ordered */ public static final int RECURRENT_DEPT_VALUE = 5; /** * An array of all the 'Expense Purpose' enumerators. * * * @generated */ private static final Expense_Purpose[] VALUES_ARRAY = new Expense_Purpose[] { HOUSE_CARE, CHILD_CARE, DEPENDENCE_CARE, OTHER, ALIMONY, RECURRENT_DEPT, }; /** * A public read-only list of all the 'Expense Purpose' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Expense Purpose' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static Expense_Purpose get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { Expense_Purpose result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Expense Purpose' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static Expense_Purpose getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { Expense_Purpose result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Expense Purpose' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static Expense_Purpose get(int value) { switch (value) { case HOUSE_CARE_VALUE: return HOUSE_CARE; case CHILD_CARE_VALUE: return CHILD_CARE; case DEPENDENCE_CARE_VALUE: return DEPENDENCE_CARE; case OTHER_VALUE: return OTHER; case ALIMONY_VALUE: return ALIMONY; case RECURRENT_DEPT_VALUE: return RECURRENT_DEPT; } 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 Expense_Purpose(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * * * @generated */ @Override public int getValue() { return value; } /** * * * @generated */ @Override public String getName() { return name; } /** * * * @generated */ @Override public String getLiteral() { return literal; } /** * Returns the literal value of the enumerator, which is its string representation. * * * @generated */ @Override public String toString() { return literal; } } //Expense_Purpose