| /********************************************************************* |
| * Copyright (c) 2011, 2019 SAP SE |
| * |
| * This program and the accompanying materials are made |
| * available under the terms of the Eclipse Public License 2.0 |
| * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * Contributors: |
| * SAP SE - initial API, implementation and documentation |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| **********************************************************************/ |
| package org.eclipse.graphiti.examples.mm.chess; |
| |
| import java.util.Arrays; |
| import java.util.Collections; |
| import java.util.List; |
| |
| import org.eclipse.emf.common.util.Enumerator; |
| |
| /** |
| * <!-- begin-user-doc --> A representation of the literals of the enumeration |
| * '<em><b>Files</b></em>', and utility methods for working with them. <!-- |
| * end-user-doc --> |
| * |
| * @see org.eclipse.graphiti.examples.mm.chess.ChessPackage#getFiles() |
| * @model |
| * @generated |
| */ |
| public enum Files implements Enumerator { |
| /** |
| * The '<em><b>None</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #NONE_VALUE |
| * @generated |
| * @ordered |
| */ |
| NONE(0, "none", "none"), |
| /** |
| * The '<em><b>A</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #A_VALUE |
| * @generated |
| * @ordered |
| */ |
| A(1, "A", "A"), |
| |
| /** |
| * The '<em><b>B</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #B_VALUE |
| * @generated |
| * @ordered |
| */ |
| B(2, "B", "B"), |
| |
| /** |
| * The '<em><b>C</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #C_VALUE |
| * @generated |
| * @ordered |
| */ |
| C(3, "C", "C"), |
| |
| /** |
| * The '<em><b>D</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #D_VALUE |
| * @generated |
| * @ordered |
| */ |
| D(4, "D", "D"), |
| |
| /** |
| * The '<em><b>E</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #E_VALUE |
| * @generated |
| * @ordered |
| */ |
| E(5, "E", "E"), |
| |
| /** |
| * The '<em><b>F</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #F_VALUE |
| * @generated |
| * @ordered |
| */ |
| F(6, "F", "F"), |
| |
| /** |
| * The '<em><b>G</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #G_VALUE |
| * @generated |
| * @ordered |
| */ |
| G(7, "G", "G"), |
| |
| /** |
| * The '<em><b>H</b></em>' literal object. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @see #H_VALUE |
| * @generated |
| * @ordered |
| */ |
| H(8, "H", "H"); |
| |
| /** |
| * The '<em><b>None</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>None</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #NONE |
| * @model name="none" |
| * @generated |
| * @ordered |
| */ |
| public static final int NONE_VALUE = 0; |
| |
| /** |
| * The '<em><b>A</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>A</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #A |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int A_VALUE = 1; |
| |
| /** |
| * The '<em><b>B</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>B</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #B |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int B_VALUE = 2; |
| |
| /** |
| * The '<em><b>C</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>C</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #C |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int C_VALUE = 3; |
| |
| /** |
| * The '<em><b>D</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>D</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #D |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int D_VALUE = 4; |
| |
| /** |
| * The '<em><b>E</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>E</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #E |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int E_VALUE = 5; |
| |
| /** |
| * The '<em><b>F</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>F</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #F |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int F_VALUE = 6; |
| |
| /** |
| * The '<em><b>G</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>G</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #G |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int G_VALUE = 7; |
| |
| /** |
| * The '<em><b>H</b></em>' literal value. <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>H</b></em>' literal object isn't clear, there |
| * really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * |
| * @see #H |
| * @model |
| * @generated |
| * @ordered |
| */ |
| public static final int H_VALUE = 8; |
| |
| /** |
| * An array of all the '<em><b>Files</b></em>' enumerators. <!-- |
| * begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| private static final Files[] VALUES_ARRAY = new Files[] { NONE, A, B, C, D, E, F, G, H, }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Files</b></em>' enumerators. |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static final List<Files> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Files</b></em>' literal with the specified literal |
| * value. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static Files get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| Files result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Files</b></em>' literal with the specified name. <!-- |
| * begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static Files getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| Files result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Files</b></em>' literal with the specified integer |
| * value. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static Files get(int value) { |
| switch (value) { |
| case NONE_VALUE: |
| return NONE; |
| case A_VALUE: |
| return A; |
| case B_VALUE: |
| return B; |
| case C_VALUE: |
| return C; |
| case D_VALUE: |
| return D; |
| case E_VALUE: |
| return E; |
| case F_VALUE: |
| return F; |
| case G_VALUE: |
| return G; |
| case H_VALUE: |
| return H; |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| private final int value; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| private final String name; |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| private final String literal; |
| |
| /** |
| * Only this class can construct instances. <!-- begin-user-doc --> <!-- |
| * end-user-doc --> |
| * |
| * @generated |
| */ |
| private Files(int value, String name, String literal) { |
| this.value = value; |
| this.name = name; |
| this.literal = literal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public int getValue() { |
| return value; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public String getName() { |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public String getLiteral() { |
| return literal; |
| } |
| |
| /** |
| * Returns the literal value of the enumerator, which is its string |
| * representation. <!-- begin-user-doc --> <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| return literal; |
| } |
| |
| } // Files |