blob: 268fa9871c5835b6271b4a9d4ecc2fd2768b6ea8 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 David Carlson and others.
* 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:
* David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.mdht.uml.fhir.core.valueset;
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>Surface Codes</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getSurfaceCodes()
* @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='Surface Codes'"
* @generated
*/
public enum SurfaceCodes implements Enumerator {
/**
* The '<em><b>M</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #M_VALUE
* @generated
* @ordered
*/
M(0, "m", "m"),
/**
* The '<em><b>O</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #O_VALUE
* @generated
* @ordered
*/
O(1, "o", "o"),
/**
* The '<em><b>I</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #I_VALUE
* @generated
* @ordered
*/
I(2, "i", "i"),
/**
* The '<em><b>D</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #D_VALUE
* @generated
* @ordered
*/
D(3, "d", "d"),
/**
* The '<em><b>B</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #B_VALUE
* @generated
* @ordered
*/
B(4, "b", "b"),
/**
* The '<em><b>V</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #V_VALUE
* @generated
* @ordered
*/
V(5, "v", "v"),
/**
* The '<em><b>L</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #L_VALUE
* @generated
* @ordered
*/
L(6, "l", "l"),
/**
* The '<em><b>Mo</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MO_VALUE
* @generated
* @ordered
*/
MO(7, "mo", "mo"),
/**
* The '<em><b>Do</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DO_VALUE
* @generated
* @ordered
*/
DO(8, "do", "do"),
/**
* The '<em><b>Di</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DI_VALUE
* @generated
* @ordered
*/
DI(9, "di", "di"),
/**
* The '<em><b>Mod</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MOD_VALUE
* @generated
* @ordered
*/
MOD(10, "mod", "mod");
/**
* The '<em><b>M</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>M</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #M
* @model name="m"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='M'"
* @generated
* @ordered
*/
public static final int M_VALUE = 0;
/**
* The '<em><b>O</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>O</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #O
* @model name="o"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='O'"
* @generated
* @ordered
*/
public static final int O_VALUE = 1;
/**
* The '<em><b>I</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>I</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #I
* @model name="i"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='I'"
* @generated
* @ordered
*/
public static final int I_VALUE = 2;
/**
* 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 name="d"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='D'"
* @generated
* @ordered
*/
public static final int D_VALUE = 3;
/**
* 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 name="b"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='B'"
* @generated
* @ordered
*/
public static final int B_VALUE = 4;
/**
* The '<em><b>V</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>V</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #V
* @model name="v"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='V'"
* @generated
* @ordered
*/
public static final int V_VALUE = 5;
/**
* The '<em><b>L</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>L</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #L
* @model name="l"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='L'"
* @generated
* @ordered
*/
public static final int L_VALUE = 6;
/**
* The '<em><b>Mo</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Mo</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MO
* @model name="mo"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='MO'"
* @generated
* @ordered
*/
public static final int MO_VALUE = 7;
/**
* The '<em><b>Do</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Do</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DO
* @model name="do"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='DO'"
* @generated
* @ordered
*/
public static final int DO_VALUE = 8;
/**
* The '<em><b>Di</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Di</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DI
* @model name="di"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='DI'"
* @generated
* @ordered
*/
public static final int DI_VALUE = 9;
/**
* The '<em><b>Mod</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Mod</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MOD
* @model name="mod"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='MOD'"
* @generated
* @ordered
*/
public static final int MOD_VALUE = 10;
/**
* An array of all the '<em><b>Surface Codes</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SurfaceCodes[] VALUES_ARRAY =
new SurfaceCodes[] {
M,
O,
I,
D,
B,
V,
L,
MO,
DO,
DI,
MOD,
};
/**
* A public read-only list of all the '<em><b>Surface Codes</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SurfaceCodes> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Surface Codes</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 SurfaceCodes get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SurfaceCodes result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Surface Codes</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 SurfaceCodes getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SurfaceCodes result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Surface Codes</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 SurfaceCodes get(int value) {
switch (value) {
case M_VALUE: return M;
case O_VALUE: return O;
case I_VALUE: return I;
case D_VALUE: return D;
case B_VALUE: return B;
case V_VALUE: return V;
case L_VALUE: return L;
case MO_VALUE: return MO;
case DO_VALUE: return DO;
case DI_VALUE: return DI;
case MOD_VALUE: return MOD;
}
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 SurfaceCodes(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;
}
} //SurfaceCodes