blob: 7e6a058da4f99eb30b58260dd71cdbf3f077e1b6 [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>Additional Material Codes</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getAdditionalMaterialCodes()
* @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='Additional Material Codes'"
* @generated
*/
public enum AdditionalMaterialCodes implements Enumerator {
/**
* The '<em><b>Xray</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #XRAY_VALUE
* @generated
* @ordered
*/
XRAY(0, "xray", "xray"),
/**
* The '<em><b>Image</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IMAGE_VALUE
* @generated
* @ordered
*/
IMAGE(1, "image", "image"),
/**
* The '<em><b>Email</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #EMAIL_VALUE
* @generated
* @ordered
*/
EMAIL(2, "email", "email"),
/**
* The '<em><b>Model</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MODEL_VALUE
* @generated
* @ordered
*/
MODEL(3, "model", "model"),
/**
* The '<em><b>Document</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DOCUMENT_VALUE
* @generated
* @ordered
*/
DOCUMENT(4, "document", "document"),
/**
* The '<em><b>Other</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OTHER_VALUE
* @generated
* @ordered
*/
OTHER(5, "other", "other");
/**
* The '<em><b>Xray</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Xray</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #XRAY
* @model name="xray"
* @generated
* @ordered
*/
public static final int XRAY_VALUE = 0;
/**
* The '<em><b>Image</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Image</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IMAGE
* @model name="image"
* @generated
* @ordered
*/
public static final int IMAGE_VALUE = 1;
/**
* The '<em><b>Email</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Email</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #EMAIL
* @model name="email"
* @generated
* @ordered
*/
public static final int EMAIL_VALUE = 2;
/**
* The '<em><b>Model</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Model</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MODEL
* @model name="model"
* @generated
* @ordered
*/
public static final int MODEL_VALUE = 3;
/**
* The '<em><b>Document</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Document</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DOCUMENT
* @model name="document"
* @generated
* @ordered
*/
public static final int DOCUMENT_VALUE = 4;
/**
* The '<em><b>Other</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Other</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OTHER
* @model name="other"
* @generated
* @ordered
*/
public static final int OTHER_VALUE = 5;
/**
* An array of all the '<em><b>Additional Material Codes</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final AdditionalMaterialCodes[] VALUES_ARRAY =
new AdditionalMaterialCodes[] {
XRAY,
IMAGE,
EMAIL,
MODEL,
DOCUMENT,
OTHER,
};
/**
* A public read-only list of all the '<em><b>Additional Material Codes</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<AdditionalMaterialCodes> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Additional Material 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 AdditionalMaterialCodes get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
AdditionalMaterialCodes result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Additional Material 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 AdditionalMaterialCodes getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
AdditionalMaterialCodes result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Additional Material 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 AdditionalMaterialCodes get(int value) {
switch (value) {
case XRAY_VALUE: return XRAY;
case IMAGE_VALUE: return IMAGE;
case EMAIL_VALUE: return EMAIL;
case MODEL_VALUE: return MODEL;
case DOCUMENT_VALUE: return DOCUMENT;
case OTHER_VALUE: return OTHER;
}
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 AdditionalMaterialCodes(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;
}
} //AdditionalMaterialCodes