/** */ 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 'Binary Operator', * and utility methods for working with them. * * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getBinaryOperator() * @model * @generated */ public enum BinaryOperator implements Enumerator { /** * The 'PLUS' literal object. * * * @see #PLUS_VALUE * @generated * @ordered */ PLUS(0, "PLUS", "PLUS"), /** * The 'MINUS' literal object. * * * @see #MINUS_VALUE * @generated * @ordered */ MINUS(1, "MINUS", "MINUS"), /** * The 'MULTIPLY' literal object. * * * @see #MULTIPLY_VALUE * @generated * @ordered */ MULTIPLY(2, "MULTIPLY", "MULTIPLY"), /** * The 'DIVIDE' literal object. * * * @see #DIVIDE_VALUE * @generated * @ordered */ DIVIDE(3, "DIVIDE", "DIVIDE"), /** * The 'POW' literal object. * * * @see #POW_VALUE * @generated * @ordered */ POW(4, "POW", "POW"), /** * The 'IN' literal object. * * * @see #IN_VALUE * @generated * @ordered */ IN(5, "IN", "IN"), /** * The 'EQUALS' literal object. * * * @see #EQUALS_VALUE * @generated * @ordered */ EQUALS(6, "EQUALS", "EQUALS"), /** * The 'NOT EQUALS' literal object. * * * @see #NOT_EQUALS_VALUE * @generated * @ordered */ NOT_EQUALS(7, "NOT_EQUALS", "NOT_EQUALS"), /** * The 'LESS' literal object. * * * @see #LESS_VALUE * @generated * @ordered */ LESS(8, "LESS", "LESS"), /** * The 'LESS EQUALS' literal object. * * * @see #LESS_EQUALS_VALUE * @generated * @ordered */ LESS_EQUALS(9, "LESS_EQUALS", "LESS_EQUALS"), /** * The 'GREATER' literal object. * * * @see #GREATER_VALUE * @generated * @ordered */ GREATER(10, "GREATER", "GREATER"), /** * The 'GREATER EQUALS' literal object. * * * @see #GREATER_EQUALS_VALUE * @generated * @ordered */ GREATER_EQUALS(11, "GREATER_EQUALS", "GREATER_EQUALS"); /** * The 'PLUS' literal value. * * * @see #PLUS * @model * @generated * @ordered */ public static final int PLUS_VALUE = 0; /** * The 'MINUS' literal value. * * * @see #MINUS * @model * @generated * @ordered */ public static final int MINUS_VALUE = 1; /** * The 'MULTIPLY' literal value. * * * @see #MULTIPLY * @model * @generated * @ordered */ public static final int MULTIPLY_VALUE = 2; /** * The 'DIVIDE' literal value. * * * @see #DIVIDE * @model * @generated * @ordered */ public static final int DIVIDE_VALUE = 3; /** * The 'POW' literal value. * * * @see #POW * @model * @generated * @ordered */ public static final int POW_VALUE = 4; /** * The 'IN' literal value. * * * @see #IN * @model * @generated * @ordered */ public static final int IN_VALUE = 5; /** * The 'EQUALS' literal value. * * * @see #EQUALS * @model * @generated * @ordered */ public static final int EQUALS_VALUE = 6; /** * The 'NOT EQUALS' literal value. * * * @see #NOT_EQUALS * @model * @generated * @ordered */ public static final int NOT_EQUALS_VALUE = 7; /** * The 'LESS' literal value. * * * @see #LESS * @model * @generated * @ordered */ public static final int LESS_VALUE = 8; /** * The 'LESS EQUALS' literal value. * * * @see #LESS_EQUALS * @model * @generated * @ordered */ public static final int LESS_EQUALS_VALUE = 9; /** * The 'GREATER' literal value. * * * @see #GREATER * @model * @generated * @ordered */ public static final int GREATER_VALUE = 10; /** * The 'GREATER EQUALS' literal value. * * * @see #GREATER_EQUALS * @model * @generated * @ordered */ public static final int GREATER_EQUALS_VALUE = 11; /** * An array of all the 'Binary Operator' enumerators. * * * @generated */ private static final BinaryOperator[] VALUES_ARRAY = new BinaryOperator[] { PLUS, MINUS, MULTIPLY, DIVIDE, POW, IN, EQUALS, NOT_EQUALS, LESS, LESS_EQUALS, GREATER, GREATER_EQUALS, }; /** * A public read-only list of all the 'Binary Operator' enumerators. * * * @generated */ public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); /** * Returns the 'Binary Operator' literal with the specified literal value. * * * @param literal the literal. * @return the matching enumerator or null. * @generated */ public static BinaryOperator get(String literal) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { BinaryOperator result = VALUES_ARRAY[i]; if (result.toString().equals(literal)) { return result; } } return null; } /** * Returns the 'Binary Operator' literal with the specified name. * * * @param name the name. * @return the matching enumerator or null. * @generated */ public static BinaryOperator getByName(String name) { for (int i = 0; i < VALUES_ARRAY.length; ++i) { BinaryOperator result = VALUES_ARRAY[i]; if (result.getName().equals(name)) { return result; } } return null; } /** * Returns the 'Binary Operator' literal with the specified integer value. * * * @param value the integer value. * @return the matching enumerator or null. * @generated */ public static BinaryOperator get(int value) { switch (value) { case PLUS_VALUE: return PLUS; case MINUS_VALUE: return MINUS; case MULTIPLY_VALUE: return MULTIPLY; case DIVIDE_VALUE: return DIVIDE; case POW_VALUE: return POW; case IN_VALUE: return IN; case EQUALS_VALUE: return EQUALS; case NOT_EQUALS_VALUE: return NOT_EQUALS; case LESS_VALUE: return LESS; case LESS_EQUALS_VALUE: return LESS_EQUALS; case GREATER_VALUE: return GREATER; 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 BinaryOperator(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; } } //BinaryOperator