/**
*/
package org.eclipse.viatra.solver.language.solverLanguage;
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 'Attribute Kind',
* and utility methods for working with them.
*
* @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getAttributeKind()
* @model
* @generated
*/
public enum AttributeKind implements Enumerator {
/**
* The 'FUNCTIONAL' literal object.
*
*
* @see #FUNCTIONAL_VALUE
* @generated
* @ordered
*/
FUNCTIONAL(0, "FUNCTIONAL", "FUNCTIONAL"),
/**
* The 'ERROR' literal object.
*
*
* @see #ERROR_VALUE
* @generated
* @ordered
*/
ERROR(1, "ERROR", "ERROR"),
/**
* The 'ROOT' literal object.
*
*
* @see #ROOT_VALUE
* @generated
* @ordered
*/
ROOT(2, "ROOT", "ROOT"),
/**
* The 'CONTAINMENT' literal object.
*
*
* @see #CONTAINMENT_VALUE
* @generated
* @ordered
*/
CONTAINMENT(3, "CONTAINMENT", "CONTAINMENT");
/**
* The 'FUNCTIONAL' literal value.
*
*
* @see #FUNCTIONAL
* @model
* @generated
* @ordered
*/
public static final int FUNCTIONAL_VALUE = 0;
/**
* The 'ERROR' literal value.
*
*
* @see #ERROR
* @model
* @generated
* @ordered
*/
public static final int ERROR_VALUE = 1;
/**
* The 'ROOT' literal value.
*
*
* @see #ROOT
* @model
* @generated
* @ordered
*/
public static final int ROOT_VALUE = 2;
/**
* The 'CONTAINMENT' literal value.
*
*
* @see #CONTAINMENT
* @model
* @generated
* @ordered
*/
public static final int CONTAINMENT_VALUE = 3;
/**
* An array of all the 'Attribute Kind' enumerators.
*
*
* @generated
*/
private static final AttributeKind[] VALUES_ARRAY = new AttributeKind[] { FUNCTIONAL, ERROR, ROOT, CONTAINMENT, };
/**
* A public read-only list of all the 'Attribute Kind' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Attribute Kind' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static AttributeKind get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
AttributeKind result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the 'Attribute Kind' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static AttributeKind getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
AttributeKind result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the 'Attribute Kind' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static AttributeKind get(int value) {
switch (value) {
case FUNCTIONAL_VALUE:
return FUNCTIONAL;
case ERROR_VALUE:
return ERROR;
case ROOT_VALUE:
return ROOT;
case CONTAINMENT_VALUE:
return CONTAINMENT;
}
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 AttributeKind(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;
}
} //AttributeKind