| /******************************************************************************* |
| * 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>Example Use Codes For List</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getExampleUseCodesForList() |
| * @model annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='Example Use Codes for List'" |
| * @generated |
| */ |
| public enum ExampleUseCodesForList implements Enumerator { |
| /** |
| * The '<em><b>Alerts</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ALERTS_VALUE |
| * @generated |
| * @ordered |
| */ |
| ALERTS(0, "alerts", "alerts"), |
| |
| /** |
| * The '<em><b>Adverserxns</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ADVERSERXNS_VALUE |
| * @generated |
| * @ordered |
| */ |
| ADVERSERXNS(1, "adverserxns", "adverserxns"), |
| |
| /** |
| * The '<em><b>Allergies</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ALLERGIES_VALUE |
| * @generated |
| * @ordered |
| */ |
| ALLERGIES(2, "allergies", "allergies"), |
| |
| /** |
| * The '<em><b>Medications</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #MEDICATIONS_VALUE |
| * @generated |
| * @ordered |
| */ |
| MEDICATIONS(3, "medications", "medications"), |
| |
| /** |
| * The '<em><b>Problems</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PROBLEMS_VALUE |
| * @generated |
| * @ordered |
| */ |
| PROBLEMS(4, "problems", "problems"), |
| |
| /** |
| * The '<em><b>Worklist</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #WORKLIST_VALUE |
| * @generated |
| * @ordered |
| */ |
| WORKLIST(5, "worklist", "worklist"), |
| |
| /** |
| * The '<em><b>Waiting</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #WAITING_VALUE |
| * @generated |
| * @ordered |
| */ |
| WAITING(6, "waiting", "waiting"), |
| |
| /** |
| * The '<em><b>Protocols</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PROTOCOLS_VALUE |
| * @generated |
| * @ordered |
| */ |
| PROTOCOLS(7, "protocols", "protocols"), |
| |
| /** |
| * The '<em><b>Plans</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #PLANS_VALUE |
| * @generated |
| * @ordered |
| */ |
| PLANS(8, "plans", "plans"); |
| |
| /** |
| * The '<em><b>Alerts</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Alerts</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ALERTS |
| * @model name="alerts" |
| * @generated |
| * @ordered |
| */ |
| public static final int ALERTS_VALUE = 0; |
| |
| /** |
| * The '<em><b>Adverserxns</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Adverserxns</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ADVERSERXNS |
| * @model name="adverserxns" |
| * @generated |
| * @ordered |
| */ |
| public static final int ADVERSERXNS_VALUE = 1; |
| |
| /** |
| * The '<em><b>Allergies</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Allergies</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #ALLERGIES |
| * @model name="allergies" |
| * @generated |
| * @ordered |
| */ |
| public static final int ALLERGIES_VALUE = 2; |
| |
| /** |
| * The '<em><b>Medications</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Medications</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #MEDICATIONS |
| * @model name="medications" |
| * @generated |
| * @ordered |
| */ |
| public static final int MEDICATIONS_VALUE = 3; |
| |
| /** |
| * The '<em><b>Problems</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Problems</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #PROBLEMS |
| * @model name="problems" |
| * @generated |
| * @ordered |
| */ |
| public static final int PROBLEMS_VALUE = 4; |
| |
| /** |
| * The '<em><b>Worklist</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Worklist</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #WORKLIST |
| * @model name="worklist" |
| * @generated |
| * @ordered |
| */ |
| public static final int WORKLIST_VALUE = 5; |
| |
| /** |
| * The '<em><b>Waiting</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Waiting</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #WAITING |
| * @model name="waiting" |
| * @generated |
| * @ordered |
| */ |
| public static final int WAITING_VALUE = 6; |
| |
| /** |
| * The '<em><b>Protocols</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Protocols</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #PROTOCOLS |
| * @model name="protocols" |
| * @generated |
| * @ordered |
| */ |
| public static final int PROTOCOLS_VALUE = 7; |
| |
| /** |
| * The '<em><b>Plans</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Plans</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #PLANS |
| * @model name="plans" |
| * @generated |
| * @ordered |
| */ |
| public static final int PLANS_VALUE = 8; |
| |
| /** |
| * An array of all the '<em><b>Example Use Codes For List</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final ExampleUseCodesForList[] VALUES_ARRAY = |
| new ExampleUseCodesForList[] { |
| ALERTS, |
| ADVERSERXNS, |
| ALLERGIES, |
| MEDICATIONS, |
| PROBLEMS, |
| WORKLIST, |
| WAITING, |
| PROTOCOLS, |
| PLANS, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Example Use Codes For List</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<ExampleUseCodesForList> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Example Use Codes For List</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 ExampleUseCodesForList get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ExampleUseCodesForList result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Example Use Codes For List</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 ExampleUseCodesForList getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| ExampleUseCodesForList result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Example Use Codes For List</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 ExampleUseCodesForList get(int value) { |
| switch (value) { |
| case ALERTS_VALUE: return ALERTS; |
| case ADVERSERXNS_VALUE: return ADVERSERXNS; |
| case ALLERGIES_VALUE: return ALLERGIES; |
| case MEDICATIONS_VALUE: return MEDICATIONS; |
| case PROBLEMS_VALUE: return PROBLEMS; |
| case WORKLIST_VALUE: return WORKLIST; |
| case WAITING_VALUE: return WAITING; |
| case PROTOCOLS_VALUE: return PROTOCOLS; |
| case PLANS_VALUE: return PLANS; |
| } |
| 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 ExampleUseCodesForList(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; |
| } |
| |
| } //ExampleUseCodesForList |