blob: eeff281a7c622806e7fb3e888dde1fe14595ba6e [file] [log] [blame]
/**
*/
package org.eclipse.qvto.examples.xtext.qvtoperationalcs;
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>Feature Key</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.qvto.examples.xtext.qvtoperationalcs.QVTOperationalCSPackage#getFeatureKey()
* @model
* @generated
*/
public enum FeatureKey implements Enumerator {
/**
* The '<em><b>Composes</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #COMPOSES_VALUE
* @generated
* @ordered
*/
COMPOSES(0, "composes", "composes"),
/**
* The '<em><b>References</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REFERENCES_VALUE
* @generated
* @ordered
*/
REFERENCES(1, "references", "references"), /**
* The '<em><b>Readonly</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #READONLY_VALUE
* @generated
* @ordered
*/
READONLY(2, "readonly", "readonly"),
/**
* The '<em><b>Derived</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DERIVED_VALUE
* @generated
* @ordered
*/
DERIVED(3, "derived", "derived"),
/**
* The '<em><b>Static</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #STATIC_VALUE
* @generated
* @ordered
*/
STATIC(4, "static", "static");
/**
* The '<em><b>Composes</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>COMPOSES</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #COMPOSES
* @model name="composes"
* @generated
* @ordered
*/
public static final int COMPOSES_VALUE = 0;
/**
* The '<em><b>References</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>References</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REFERENCES
* @model name="references"
* @generated
* @ordered
*/
public static final int REFERENCES_VALUE = 1;
/**
* The '<em><b>Readonly</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>READONLY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #READONLY
* @model name="readonly"
* @generated
* @ordered
*/
public static final int READONLY_VALUE = 2;
/**
* The '<em><b>Derived</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>DERIVED</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DERIVED
* @model name="derived"
* @generated
* @ordered
*/
public static final int DERIVED_VALUE = 3;
/**
* The '<em><b>Static</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>STATIC</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #STATIC
* @model name="static"
* @generated
* @ordered
*/
public static final int STATIC_VALUE = 4;
/**
* An array of all the '<em><b>Feature Key</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final FeatureKey[] VALUES_ARRAY =
new FeatureKey[] {
COMPOSES,
REFERENCES,
READONLY,
DERIVED,
STATIC,
};
/**
* A public read-only list of all the '<em><b>Feature Key</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<FeatureKey> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Feature Key</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param literal the literal.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static FeatureKey get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
FeatureKey result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Feature Key</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param name the name.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static FeatureKey getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
FeatureKey result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Feature Key</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the integer value.
* @return the matching enumerator or <code>null</code>.
* @generated
*/
public static FeatureKey get(int value) {
switch (value) {
case COMPOSES_VALUE: return COMPOSES;
case REFERENCES_VALUE: return REFERENCES;
case READONLY_VALUE: return READONLY;
case DERIVED_VALUE: return DERIVED;
case STATIC_VALUE: return STATIC;
}
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 FeatureKey(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;
}
} //FeatureKey