From 42c58bbeead1dae09c51f47abc8e10dfbb9c3f9f Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 23 Jun 2020 15:17:00 +0200 Subject: New configuration language parser WIP --- .../language/solverLanguage/ObjectiveKind.java | 204 +++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100644 Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ObjectiveKind.java (limited to 'Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ObjectiveKind.java') diff --git a/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ObjectiveKind.java b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ObjectiveKind.java new file mode 100644 index 00000000..e81389fb --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.model/src-gen/org/eclipse/viatra/solver/language/solverLanguage/ObjectiveKind.java @@ -0,0 +1,204 @@ +/** + */ +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 'Objective Kind', + * and utility methods for working with them. + * + * @see org.eclipse.viatra.solver.language.solverLanguage.SolverLanguagePackage#getObjectiveKind() + * @model + * @generated + */ +public enum ObjectiveKind implements Enumerator { + /** + * The 'MINIMIZATION' literal object. + * + * + * @see #MINIMIZATION_VALUE + * @generated + * @ordered + */ + MINIMIZATION(0, "MINIMIZATION", "MINIMIZATION"), + + /** + * The 'MAXIMIZATION' literal object. + * + * + * @see #MAXIMIZATION_VALUE + * @generated + * @ordered + */ + MAXIMIZATION(1, "MAXIMIZATION", "MAXIMIZATION"); + + /** + * The 'MINIMIZATION' literal value. + * + * + * @see #MINIMIZATION + * @model + * @generated + * @ordered + */ + public static final int MINIMIZATION_VALUE = 0; + + /** + * The 'MAXIMIZATION' literal value. + * + * + * @see #MAXIMIZATION + * @model + * @generated + * @ordered + */ + public static final int MAXIMIZATION_VALUE = 1; + + /** + * An array of all the 'Objective Kind' enumerators. + * + * + * @generated + */ + private static final ObjectiveKind[] VALUES_ARRAY = new ObjectiveKind[] { MINIMIZATION, MAXIMIZATION, }; + + /** + * A public read-only list of all the 'Objective Kind' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Objective Kind' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static ObjectiveKind get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ObjectiveKind result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Objective Kind' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static ObjectiveKind getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + ObjectiveKind result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Objective Kind' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static ObjectiveKind get(int value) { + switch (value) { + case MINIMIZATION_VALUE: + return MINIMIZATION; + case MAXIMIZATION_VALUE: + return MAXIMIZATION; + } + 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 ObjectiveKind(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; + } + +} //ObjectiveKind -- cgit v1.2.3-54-g00ecf