/**
* <copyright>
* </copyright>
*
* $Id$
*/
package de.twenty11.skysail.ext.forms;
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>Type</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see de.twenty11.skysail.ext.forms.FormsPackage#getType()
* @model
* @generated
*/
public final class Type extends AbstractEnumerator {
/**
* The '<em><b>String</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>String</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #STRING_LITERAL
* @model name="String"
* @generated
* @ordered
*/
public static final int STRING = 0;
/**
* The '<em><b>Integer</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Integer</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #INTEGER_LITERAL
* @model name="Integer"
* @generated
* @ordered
*/
public static final int INTEGER = 1;
/**
* The '<em><b>String</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #STRING
* @generated
* @ordered
*/
public static final Type STRING_LITERAL = new Type(STRING, "String", "String");
/**
* The '<em><b>Integer</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #INTEGER
* @generated
* @ordered
*/
public static final Type INTEGER_LITERAL = new Type(INTEGER, "Integer", "Integer");
/**
* An array of all the '<em><b>Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final Type[] VALUES_ARRAY =
new Type[] {
STRING_LITERAL,
INTEGER_LITERAL,
};
/**
* A public read-only list of all the '<em><b>Type</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>Type</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Type get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Type result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Type</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Type getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
Type result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Type</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Type get(int value) {
switch (value) {
case STRING: return STRING_LITERAL;
case INTEGER: return INTEGER_LITERAL;
}
return null;
}
/**
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private Type(int value, String name, String literal) {
super(value, name, literal);
}
} //Type