/** */ package org.etsi.mts.tdl; 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 'Time Label Use Kind', * and utility methods for working with them. * * @see org.etsi.mts.tdl.tdlPackage#getTimeLabelUseKind() * @model * @generated */ public enum TimeLabelUseKind implements Enumerator { /** * The 'Last' literal object. * * * @see #LAST_VALUE * @generated * @ordered */ LAST(0, "Last", "Last"), /** * The 'Previous' literal object. * * * @see #PREVIOUS_VALUE * @generated * @ordered */ PREVIOUS(1, "Previous", "Previous"), /** * The 'First' literal object. * * * @see #FIRST_VALUE * @generated * @ordered */ FIRST(2, "First", "First"); /** * The 'Last' literal value. * * * @see #LAST * @model name="Last" * @generated * @ordered */ public static final int LAST_VALUE = 0; /** * The 'Previous' literal value. * * * @see #PREVIOUS * @model name="Previous" * @generated * @ordered */ public static final int PREVIOUS_VALUE = 1; /** * The 'First' literal value. * * * @see #FIRST * @model name="First" * @generated * @ordered */ public static final int FIRST_VALUE = 2; /** * An array of all the 'Time Label Use Kind' enumerators. * * * @generated */ private static final TimeLabelUseKind[] VALUES_ARRAY = new TimeLabelUseKind[] { LAST, PREVIOUS, FIRST, }; /** * A public read-only list of all the 'Time Label Use Kind' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Time Label Use Kind' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static TimeLabelUseKind get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TimeLabelUseKind result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Time Label Use Kind' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static TimeLabelUseKind getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { TimeLabelUseKind result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Time Label Use Kind' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static TimeLabelUseKind get(int value) { switch (value) { case LAST_VALUE: return LAST; case PREVIOUS_VALUE: return PREVIOUS; case FIRST_VALUE: return 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 TimeLabelUseKind(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; } } //TimeLabelUseKind