| /** |
| * Copyright (c) 2017 CEA LIST. |
| * |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * Sébastien Gerard (CEA LIST) <sebastien.gerard@cea.fr> - Initial API and implementation |
| * Yupanqui Munoz Julho (CEA LIST) <yupanqui.munozjulho@cea.fr> - Initial API and implementation |
| * |
| */ |
| package org.eclipse.papyrus.requirements.sysml14.papyrusre.modellibrary.papyrusrestandardutils.priorityandimportanceconcerns; |
| |
| 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>Importance Kind</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.papyrus.requirements.sysml14.papyrusre.modellibrary.papyrusrestandardutils.priorityandimportanceconcerns.PriorityAndImportanceConcernsPackage#getImportanceKind() |
| * @model |
| * @generated |
| */ |
| public enum ImportanceKind implements Enumerator { |
| /** |
| * The '<em><b>Importance1</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE1_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE1(0, "Importance1", "1"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance2</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE2_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE2(1, "Importance2", "2"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance3</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE3_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE3(2, "Importance3", "3"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance4</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE4_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE4(3, "Importance4", "4"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance5</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE5_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE5(4, "Importance5", "5"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance6</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE6_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE6(5, "Importance6", "6"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance7</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE7_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE7(6, "Importance7", "7"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance8</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE8_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE8(7, "Importance8", "8"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance9</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE9_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE9(8, "Importance9", "9"), //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance10</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE10_VALUE |
| * @generated |
| * @ordered |
| */ |
| IMPORTANCE10(9, "Importance10", "10"); //$NON-NLS-1$ //$NON-NLS-2$ |
| |
| /** |
| * The '<em><b>Importance1</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance1</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE1 |
| * @model name="Importance1" literal="1" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_1'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE1_VALUE = 0; |
| |
| /** |
| * The '<em><b>Importance2</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance2</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE2 |
| * @model name="Importance2" literal="2" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_2'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE2_VALUE = 1; |
| |
| /** |
| * The '<em><b>Importance3</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance3</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE3 |
| * @model name="Importance3" literal="3" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_3'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE3_VALUE = 2; |
| |
| /** |
| * The '<em><b>Importance4</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance4</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE4 |
| * @model name="Importance4" literal="4" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_4'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE4_VALUE = 3; |
| |
| /** |
| * The '<em><b>Importance5</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance5</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE5 |
| * @model name="Importance5" literal="5" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_5'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE5_VALUE = 4; |
| |
| /** |
| * The '<em><b>Importance6</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance6</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE6 |
| * @model name="Importance6" literal="6" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_6'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE6_VALUE = 5; |
| |
| /** |
| * The '<em><b>Importance7</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance7</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE7 |
| * @model name="Importance7" literal="7" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_7'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE7_VALUE = 6; |
| |
| /** |
| * The '<em><b>Importance8</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance8</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE8 |
| * @model name="Importance8" literal="8" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_8'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE8_VALUE = 7; |
| |
| /** |
| * The '<em><b>Importance9</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance9</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE9 |
| * @model name="Importance9" literal="9" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_9'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE9_VALUE = 8; |
| |
| /** |
| * The '<em><b>Importance10</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Importance10</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #IMPORTANCE10 |
| * @model name="Importance10" literal="10" |
| * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='_10'" |
| * @generated |
| * @ordered |
| */ |
| public static final int IMPORTANCE10_VALUE = 9; |
| |
| /** |
| * An array of all the '<em><b>Importance Kind</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final ImportanceKind[] VALUES_ARRAY = |
| new ImportanceKind[] { |
| IMPORTANCE1, |
| IMPORTANCE2, |
| IMPORTANCE3, |
| IMPORTANCE4, |
| IMPORTANCE5, |
| IMPORTANCE6, |
| IMPORTANCE7, |
| IMPORTANCE8, |
| IMPORTANCE9, |
| IMPORTANCE10, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Importance Kind</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<ImportanceKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Importance Kind</b></em>' literal with the specified literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param literal the literal. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static ImportanceKind get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ImportanceKind result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Importance Kind</b></em>' literal with the specified name. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param name the name. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static ImportanceKind getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ImportanceKind result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Importance Kind</b></em>' literal with the specified integer value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the integer value. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static ImportanceKind get(int value) { |
| switch (value) { |
| case IMPORTANCE1_VALUE: return IMPORTANCE1; |
| case IMPORTANCE2_VALUE: return IMPORTANCE2; |
| case IMPORTANCE3_VALUE: return IMPORTANCE3; |
| case IMPORTANCE4_VALUE: return IMPORTANCE4; |
| case IMPORTANCE5_VALUE: return IMPORTANCE5; |
| case IMPORTANCE6_VALUE: return IMPORTANCE6; |
| case IMPORTANCE7_VALUE: return IMPORTANCE7; |
| case IMPORTANCE8_VALUE: return IMPORTANCE8; |
| case IMPORTANCE9_VALUE: return IMPORTANCE9; |
| case IMPORTANCE10_VALUE: return IMPORTANCE10; |
| } |
| 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 ImportanceKind(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; |
| } |
| |
| } //ImportanceKind |