/**
* <copyright>
* </copyright>
*
* $Id$
*/
package orgomg.cwm.resource.xml;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.eclipse.emf.common.util.Enumerator;
/**
* <!-- begin-user-doc -->
* A representation of the literals of the enumeration '<em><b>Element Order Type</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* choice, sequence
* <!-- end-model-doc -->
* @see orgomg.cwm.resource.xml.XmlPackage#getElementOrderType()
* @model
* @generated
*/
public enum ElementOrderType implements Enumerator {
/**
* The '<em><b>Xml choice</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #XML_CHOICE_VALUE
* @generated
* @ordered
*/
XML_CHOICE(0, "xml_choice", "xml_choice"),
/**
* The '<em><b>Xml sequence</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #XML_SEQUENCE_VALUE
* @generated
* @ordered
*/
XML_SEQUENCE(1, "xml_sequence", "xml_sequence");
/**
* The '<em><b>Xml choice</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Xml choice</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #XML_CHOICE
* @model name="xml_choice"
* @generated
* @ordered
*/
public static final int XML_CHOICE_VALUE = 0;
/**
* The '<em><b>Xml sequence</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Xml sequence</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #XML_SEQUENCE
* @model name="xml_sequence"
* @generated
* @ordered
*/
public static final int XML_SEQUENCE_VALUE = 1;
/**
* An array of all the '<em><b>Element Order Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final ElementOrderType[] VALUES_ARRAY =
new ElementOrderType[] {
XML_CHOICE,
XML_SEQUENCE,
};
/**
* A public read-only list of all the '<em><b>Element Order Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<ElementOrderType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Element Order Type</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ElementOrderType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
ElementOrderType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Element Order Type</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ElementOrderType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
ElementOrderType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Element Order Type</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ElementOrderType get(int value) {
switch (value) {
case XML_CHOICE_VALUE: return XML_CHOICE;
case XML_SEQUENCE_VALUE: return XML_SEQUENCE;
}
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 ElementOrderType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
return literal;
}
} //ElementOrderType