From be4f78978faba3d3ceb88df02a7f93a2e09ff1e0 Mon Sep 17 00:00:00 2001 From: Kenji Hosokawa Date: Tue, 3 Aug 2021 18:42:39 +0900 Subject: Initial commit Bug-AGL: SPEC-4033 Signed-off-by: Kenji Hosokawa --- rba.model.core/src/rba/core/LoserType.java | 236 +++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 rba.model.core/src/rba/core/LoserType.java (limited to 'rba.model.core/src/rba/core/LoserType.java') diff --git a/rba.model.core/src/rba/core/LoserType.java b/rba.model.core/src/rba/core/LoserType.java new file mode 100644 index 0000000..997eea2 --- /dev/null +++ b/rba.model.core/src/rba/core/LoserType.java @@ -0,0 +1,236 @@ +/** + */ +package rba.core; + +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 'Loser Type', + * and utility methods for working with them. + * + * + * + * + * @see rba.core.RBACorePackage#getLoserType() + * @model + * @generated + */ +public enum LoserType implements Enumerator { + /** + * The 'NEVER GIVEUP' literal object. + * + * + * @see #NEVER_GIVEUP_VALUE + * @generated + * @ordered + */ + NEVER_GIVEUP(0, "NEVER_GIVEUP", "NEVER_GIVEUP"), + + /** + * The 'GOOD LOSER' literal object. + * + * + * @see #GOOD_LOSER_VALUE + * @generated + * @ordered + */ + GOOD_LOSER(0, "GOOD_LOSER", "GOOD_LOSER"), + + /** + * The 'DO NOT GIVEUP UNTIL WIN' literal object. + * + * + * @see #DO_NOT_GIVEUP_UNTIL_WIN_VALUE + * @generated + * @ordered + */ + DO_NOT_GIVEUP_UNTIL_WIN(0, "DO_NOT_GIVEUP_UNTIL_WIN", "DO_NOT_GIVEUP_UNTIL_WIN"); + + /** + * The 'NEVER GIVEUP' literal value. + * + * + * + * + * + * @see #NEVER_GIVEUP + * @model + * @generated + * @ordered + */ + public static final int NEVER_GIVEUP_VALUE = 0; + + /** + * The 'GOOD LOSER' literal value. + * + * + * + * + * + * @see #GOOD_LOSER + * @model + * @generated + * @ordered + */ + public static final int GOOD_LOSER_VALUE = 0; + + /** + * The 'DO NOT GIVEUP UNTIL WIN' literal value. + * + * + * + * + * + * @see #DO_NOT_GIVEUP_UNTIL_WIN + * @model + * @generated + * @ordered + */ + public static final int DO_NOT_GIVEUP_UNTIL_WIN_VALUE = 0; + + /** + * An array of all the 'Loser Type' enumerators. + * + * + * @generated + */ + private static final LoserType[] VALUES_ARRAY = new LoserType[] { NEVER_GIVEUP, GOOD_LOSER, + DO_NOT_GIVEUP_UNTIL_WIN, }; + + /** + * A public read-only list of all the 'Loser Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Loser Type' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static LoserType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LoserType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Loser Type' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static LoserType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + LoserType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Loser Type' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static LoserType get(int value) { + switch (value) { + case NEVER_GIVEUP_VALUE: + return NEVER_GIVEUP; + } + 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 LoserType(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; + } + +} //LoserType -- cgit 1.2.3-korg