/**
* generated by Xtext 2.21.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' literal object.
*
*
* @see #LESS_VALUE
* @generated
* @ordered
*/
LESS(0, "LESS", "<"),
/**
* The 'GREATER' literal object.
*
*
* @see #GREATER_VALUE
* @generated
* @ordered
*/
GREATER(1, "GREATER", ">"),
/**
* The 'LESS EQUALS' literal object.
*
*
* @see #LESS_EQUALS_VALUE
* @generated
* @ordered
*/
LESS_EQUALS(2, "LESS_EQUALS", "<="),
/**
* The 'GREATER EQUALS' literal object.
*
*
* @see #GREATER_EQUALS_VALUE
* @generated
* @ordered
*/
GREATER_EQUALS(3, "GREATER_EQUALS", ">=");
/**
* The 'LESS' literal value.
*
*
* @see #LESS
* @model literal="<"
* @generated
* @ordered
*/
public static final int LESS_VALUE = 0;
/**
* The 'GREATER' literal value.
*
*
* @see #GREATER
* @model literal=">"
* @generated
* @ordered
*/
public static final int GREATER_VALUE = 1;
/**
* The 'LESS EQUALS' literal value.
*
*
* @see #LESS_EQUALS
* @model literal="<="
* @generated
* @ordered
*/
public static final int LESS_EQUALS_VALUE = 2;
/**
* The 'GREATER EQUALS' literal value.
*
*
* @see #GREATER_EQUALS
* @model literal=">="
* @generated
* @ordered
*/
public static final int GREATER_EQUALS_VALUE = 3;
/**
* An array of all the 'Comparison Operator' enumerators.
*
*
* @generated
*/
private static final ComparisonOperator[] VALUES_ARRAY =
new ComparisonOperator[]
{
LESS,
GREATER,
LESS_EQUALS,
GREATER_EQUALS,
};
/**
* A public read-only list of all the 'Comparison Operator' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Comparison Operator' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @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_VALUE: return LESS;
case GREATER_VALUE: return GREATER;
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