package org.eclipse.emf.texo.test.model.issues.bz325427; import java.util.Arrays; import java.util.Collections; import java.util.List; /** * A representation of the literals of the enumeration '<em><b>EnumA</b></em>'. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @generated */ public enum EnumA { ; /** * An array of all the '<em><b>EnumA</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ private static final EnumA[] VALUES_ARRAY = new EnumA[] {}; /** * A public read-only list of all the '<em><b>EnumA</b></em>' enumerators. <!-- begin-user-doc --> <!-- end-user-doc * --> * * @generated */ public static final List<EnumA> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the '<em><b>EnumA</b></em>' literal with the specified literal value. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @param literal * the literal to use to get the enum instance * @return the EnumA, the literal enum class * @generated */ public static EnumA get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { EnumA result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the '<em><b>EnumA</b></em>' literal with the specified name. <!-- begin-user-doc --> <!-- end-user-doc --> * * @param name * the name to use to get the enum instance * @return the EnumA, the literal enum class * @generated */ public static EnumA getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { EnumA result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the '<em><b>EnumA</b></em>' literal with the specified integer value. <!-- begin-user-doc --> <!-- * end-user-doc --> * * @param value * the value to use to get the enum instance * @return the EnumA, the literal enum * @generated */ public static EnumA get(int value) { for (EnumA enumInstance : VALUES_ARRAY) { if (enumInstance.getValue() == value) { return enumInstance; } } return null; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ private final int value; /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ private final String name; /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ private final String literal; /** * Only this class can construct instances. <!-- begin-user-doc --> <!-- end-user-doc --> * * @generated */ private EnumA(int value, String name, String literal) { this.value = value; this.name = name; this.literal = literal; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the value * @generated */ public int getValue() { return value; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the name * @generated */ public String getName() { return name; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the literal of this enum instance * @generated */ public String getLiteral() { return literal; } /** * <!-- begin-user-doc --> <!-- end-user-doc --> * * @return the literal value of the enumerator, which is its string representation. * @generated */ @Override public String toString() { return literal; } }