/** */ package functionalarchitecture; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * * A representation of the literals of the enumeration 'Function Type', * and utility methods for working with them. * * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionType() * @model * @generated */ public enum FunctionType implements Enumerator { /** * The 'Root' literal object. * * * @see #ROOT_VALUE * @generated * @ordered */ ROOT(0, "Root", "Root"), /** * The 'Intermediate' literal object. * * * @see #INTERMEDIATE_VALUE * @generated * @ordered */ INTERMEDIATE(1, "Intermediate", "Intermediate"), /** * The 'Leaf' literal object. * * * @see #LEAF_VALUE * @generated * @ordered */ LEAF(2, "Leaf", "Leaf"); /** * The 'Root' literal value. * *
* If the meaning of 'Root' literal object isn't clear, * there really should be more of a description here... *
* * @see #ROOT * @model name="Root" * @generated * @ordered */ public static final int ROOT_VALUE = 0; /** * The 'Intermediate' literal value. * ** If the meaning of 'Intermediate' literal object isn't clear, * there really should be more of a description here... *
* * @see #INTERMEDIATE * @model name="Intermediate" * @generated * @ordered */ public static final int INTERMEDIATE_VALUE = 1; /** * The 'Leaf' literal value. * ** If the meaning of 'Leaf' literal object isn't clear, * there really should be more of a description here... *
* * @see #LEAF * @model name="Leaf" * @generated * @ordered */ public static final int LEAF_VALUE = 2; /** * An array of all the 'Function Type' enumerators. * * * @generated */ private static final FunctionType[] VALUES_ARRAY = new FunctionType[] { ROOT, INTERMEDIATE, LEAF, }; /** * A public read-only list of all the 'Function Type' enumerators. * * * @generated */ public static final Listnull
.
* @generated
*/
public static FunctionType get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
FunctionType result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Function Type' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static FunctionType getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
FunctionType result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Function Type' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static FunctionType get(int value) {
switch (value) {
case ROOT_VALUE: return ROOT;
case INTERMEDIATE_VALUE: return INTERMEDIATE;
case LEAF_VALUE: return LEAF;
}
return null;
}
/**
*
*
* @generated
*/
private final int value;
/**
*
*
* @generated
*/
private final String name;
/**
*
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
*
*
* @generated
*/
private FunctionType(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
public int getValue() {
return value;
}
/**
*
*
* @generated
*/
public String getName() {
return name;
}
/**
*
*
* @generated
*/
public String getLiteral() {
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString() {
return literal;
}
} //FunctionType