/**
*/
package Taxation;
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 'Town',
* and utility methods for working with them.
*
* @see Taxation.TaxationPackage#getTown()
* @model
* @generated
*/
public enum Town implements Enumerator {
/**
* The 'LL' literal object.
*
*
* @see #LL_VALUE
* @generated
* @ordered
*/
LL(0, "LL", "LL"),
/**
* The 'BB' literal object.
*
*
* @see #BB_VALUE
* @generated
* @ordered
*/
BB(1, "BB", "BB"),
/**
* The 'SS' literal object.
*
*
* @see #SS_VALUE
* @generated
* @ordered
*/
SS(2, "SS", "SS"),
/**
* The 'TT' literal object.
*
*
* @see #TT_VALUE
* @generated
* @ordered
*/
TT(3, "TT", "TT"),
/**
* The 'Other' literal object.
*
*
* @see #OTHER_VALUE
* @generated
* @ordered
*/
OTHER(4, "Other", "Other");
/**
* The 'LL' literal value.
*
*
* @see #LL
* @model
* @generated
* @ordered
*/
public static final int LL_VALUE = 0;
/**
* The 'BB' literal value.
*
*
* @see #BB
* @model
* @generated
* @ordered
*/
public static final int BB_VALUE = 1;
/**
* The 'SS' literal value.
*
*
* @see #SS
* @model
* @generated
* @ordered
*/
public static final int SS_VALUE = 2;
/**
* The 'TT' literal value.
*
*
* @see #TT
* @model
* @generated
* @ordered
*/
public static final int TT_VALUE = 3;
/**
* The 'Other' literal value.
*
*
* @see #OTHER
* @model name="Other"
* @generated
* @ordered
*/
public static final int OTHER_VALUE = 4;
/**
* An array of all the 'Town' enumerators.
*
*
* @generated
*/
private static final Town[] VALUES_ARRAY =
new Town[] {
LL,
BB,
SS,
TT,
OTHER,
};
/**
* A public read-only list of all the 'Town' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Town' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static Town get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Town result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Town' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static Town getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Town result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Town' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static Town get(int value) {
switch (value) {
case LL_VALUE: return LL;
case BB_VALUE: return BB;
case SS_VALUE: return SS;
case TT_VALUE: return TT;
case OTHER_VALUE: return OTHER;
}
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 Town(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;
}
} //Town