001: /**
002: * <copyright>
003: * </copyright>
004: *
005: * $Id: AllSomeType.java 7522 2007-09-12 22:00:10Z saul.farber $
006: */package net.opengis.wfs;
007:
008: import java.util.Arrays;
009: import java.util.Collections;
010: import java.util.List;
011:
012: import org.eclipse.emf.common.util.AbstractEnumerator;
013:
014: /**
015: * <!-- begin-user-doc -->
016: * A representation of the literals of the enumeration '<em><b>All Some Type</b></em>',
017: * and utility methods for working with them.
018: * <!-- end-user-doc -->
019: * @see net.opengis.wfs.WfsPackage#getAllSomeType()
020: * @model
021: * @generated
022: */
023: public final class AllSomeType extends AbstractEnumerator {
024: /**
025: * The '<em><b>ALL</b></em>' literal value.
026: * <!-- begin-user-doc -->
027: * <p>
028: * If the meaning of '<em><b>ALL</b></em>' literal object isn't clear,
029: * there really should be more of a description here...
030: * </p>
031: * <!-- end-user-doc -->
032: * @see #ALL_LITERAL
033: * @model
034: * @generated
035: * @ordered
036: */
037: public static final int ALL = 0;
038:
039: /**
040: * The '<em><b>SOME</b></em>' literal value.
041: * <!-- begin-user-doc -->
042: * <p>
043: * If the meaning of '<em><b>SOME</b></em>' literal object isn't clear,
044: * there really should be more of a description here...
045: * </p>
046: * <!-- end-user-doc -->
047: * @see #SOME_LITERAL
048: * @model
049: * @generated
050: * @ordered
051: */
052: public static final int SOME = 1;
053:
054: /**
055: * The '<em><b>ALL</b></em>' literal object.
056: * <!-- begin-user-doc -->
057: * <!-- end-user-doc -->
058: * @see #ALL
059: * @generated
060: * @ordered
061: */
062: public static final AllSomeType ALL_LITERAL = new AllSomeType(ALL,
063: "ALL", "ALL");
064:
065: /**
066: * The '<em><b>SOME</b></em>' literal object.
067: * <!-- begin-user-doc -->
068: * <!-- end-user-doc -->
069: * @see #SOME
070: * @generated
071: * @ordered
072: */
073: public static final AllSomeType SOME_LITERAL = new AllSomeType(
074: SOME, "SOME", "SOME");
075:
076: /**
077: * An array of all the '<em><b>All Some Type</b></em>' enumerators.
078: * <!-- begin-user-doc -->
079: * <!-- end-user-doc -->
080: * @generated
081: */
082: private static final AllSomeType[] VALUES_ARRAY = new AllSomeType[] {
083: ALL_LITERAL, SOME_LITERAL, };
084:
085: /**
086: * A public read-only list of all the '<em><b>All Some Type</b></em>' enumerators.
087: * <!-- begin-user-doc -->
088: * <!-- end-user-doc -->
089: * @generated
090: */
091: public static final List VALUES = Collections
092: .unmodifiableList(Arrays.asList(VALUES_ARRAY));
093:
094: /**
095: * Returns the '<em><b>All Some Type</b></em>' literal with the specified literal value.
096: * <!-- begin-user-doc -->
097: * <!-- end-user-doc -->
098: * @generated
099: */
100: public static AllSomeType get(String literal) {
101: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
102: AllSomeType result = VALUES_ARRAY[i];
103: if (result.toString().equals(literal)) {
104: return result;
105: }
106: }
107: return null;
108: }
109:
110: /**
111: * Returns the '<em><b>All Some Type</b></em>' literal with the specified name.
112: * <!-- begin-user-doc -->
113: * <!-- end-user-doc -->
114: * @generated
115: */
116: public static AllSomeType getByName(String name) {
117: for (int i = 0; i < VALUES_ARRAY.length; ++i) {
118: AllSomeType result = VALUES_ARRAY[i];
119: if (result.getName().equals(name)) {
120: return result;
121: }
122: }
123: return null;
124: }
125:
126: /**
127: * Returns the '<em><b>All Some Type</b></em>' literal with the specified integer value.
128: * <!-- begin-user-doc -->
129: * <!-- end-user-doc -->
130: * @generated
131: */
132: public static AllSomeType get(int value) {
133: switch (value) {
134: case ALL:
135: return ALL_LITERAL;
136: case SOME:
137: return SOME_LITERAL;
138: }
139: return null;
140: }
141:
142: /**
143: * Only this class can construct instances.
144: * <!-- begin-user-doc -->
145: * <!-- end-user-doc -->
146: * @generated
147: */
148: private AllSomeType(int value, String name, String literal) {
149: super (value, name, literal);
150: }
151:
152: } //AllSomeType
|