diff options
Diffstat (limited to 'examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USState.java')
-rw-r--r-- | examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USState.java | 178 |
1 files changed, 178 insertions, 0 deletions
diff --git a/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USState.java b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USState.java new file mode 100644 index 000000000..ce3bcab39 --- /dev/null +++ b/examples/org.eclipse.emf.teneo.samples/src/org/eclipse/emf/teneo/samples/emf/annotations/inheritancemapping/USState.java @@ -0,0 +1,178 @@ +/** + * <copyright> + * </copyright> + * + * $Id: USState.java,v 1.1 2006/07/11 16:57:12 mtaal Exp $ + */ +package org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.AbstractEnumerator; + +/** + * <!-- begin-user-doc --> + * A representation of the literals of the enumeration '<em><b>US State</b></em>', + * and utility methods for working with them. + * <!-- end-user-doc --> + * @see org.eclipse.emf.teneo.samples.emf.annotations.inheritancemapping.InheritancemappingPackage#getUSState() + * @model + * @generated + */ +public final class USState extends AbstractEnumerator { + /** + * The '<em><b>AK</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>AK</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #AK_LITERAL + * @model + * @generated + * @ordered + */ + public static final int AK = 0; + + /** + * The '<em><b>AL</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>AL</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #AL_LITERAL + * @model + * @generated + * @ordered + */ + public static final int AL = 1; + + /** + * The '<em><b>AR</b></em>' literal value. + * <!-- begin-user-doc --> + * <p> + * If the meaning of '<em><b>AR</b></em>' literal object isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @see #AR_LITERAL + * @model + * @generated + * @ordered + */ + public static final int AR = 2; + + /** + * The '<em><b>AK</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #AK + * @generated + * @ordered + */ + public static final USState AK_LITERAL = new USState(AK, "AK", "AK"); + + /** + * The '<em><b>AL</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #AL + * @generated + * @ordered + */ + public static final USState AL_LITERAL = new USState(AL, "AL", "AL"); + + /** + * The '<em><b>AR</b></em>' literal object. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #AR + * @generated + * @ordered + */ + public static final USState AR_LITERAL = new USState(AR, "AR", "AR"); + + /** + * An array of all the '<em><b>US State</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private static final USState[] VALUES_ARRAY = + new USState[] { + AK_LITERAL, + AL_LITERAL, + AR_LITERAL, + }; + + /** + * A public read-only list of all the '<em><b>US State</b></em>' enumerators. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the '<em><b>US State</b></em>' literal with the specified literal value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static USState get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + USState result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>US State</b></em>' literal with the specified name. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static USState getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + USState result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the '<em><b>US State</b></em>' literal with the specified integer value. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public static USState get(int value) { + switch (value) { + case AK: return AK_LITERAL; + case AL: return AL_LITERAL; + case AR: return AR_LITERAL; + } + return null; + } + + /** + * Only this class can construct instances. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private USState(int value, String name, String literal) { + super(value, name, literal); + } + +} //USState |