/** * generated by Xtext 2.16.0 */ package hu.bme.mit.inf.dslreasoner.application.applicationConfiguration; 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 'Comparison Operator', * and utility methods for working with them. * * @see hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage#getComparisonOperator() * @model * @generated */ public enum ComparisonOperator implements Enumerator { /** * The 'LESS EQUALS' literal object. * * * @see #LESS_EQUALS_VALUE * @generated * @ordered */ LESS_EQUALS(0, "LESS_EQUALS", "<="), /** * The 'GREATER EQUALS' literal object. * * * @see #GREATER_EQUALS_VALUE * @generated * @ordered */ GREATER_EQUALS(1, "GREATER_EQUALS", ">="); /** * The 'LESS EQUALS' literal value. * *
* If the meaning of 'LESS EQUALS' literal object isn't clear, * there really should be more of a description here... *
* * @see #LESS_EQUALS * @model literal="<=" * @generated * @ordered */ public static final int LESS_EQUALS_VALUE = 0; /** * The 'GREATER EQUALS' literal value. * ** If the meaning of 'GREATER EQUALS' literal object isn't clear, * there really should be more of a description here... *
* * @see #GREATER_EQUALS * @model literal=">=" * @generated * @ordered */ public static final int GREATER_EQUALS_VALUE = 1; /** * An array of all the 'Comparison Operator' enumerators. * * * @generated */ private static final ComparisonOperator[] VALUES_ARRAY = new ComparisonOperator[] { LESS_EQUALS, GREATER_EQUALS, }; /** * A public read-only list of all the 'Comparison Operator' enumerators. * * * @generated */ public static final Listnull
.
* @generated
*/
public static ComparisonOperator get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
ComparisonOperator result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}
/**
* Returns the 'Comparison Operator' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static ComparisonOperator getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
ComparisonOperator result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}
/**
* Returns the 'Comparison Operator' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static ComparisonOperator get(int value)
{
switch (value)
{
case LESS_EQUALS_VALUE: return LESS_EQUALS;
case GREATER_EQUALS_VALUE: return GREATER_EQUALS;
}
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 ComparisonOperator(int value, String name, String literal)
{
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
@Override
public int getValue()
{
return value;
}
/**
*
*
* @generated
*/
@Override
public String getName()
{
return name;
}
/**
*
*
* @generated
*/
@Override
public String getLiteral()
{
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString()
{
return literal;
}
} //ComparisonOperator