blob: a79ea3a1e1ac2dc8de89454b626d76b224d71b32 [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>Resource Version Policy</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getResourceVersionPolicy()
* @model
* @generated
*/
public enum ResourceVersionPolicy implements Enumerator {
/**
* The '<em><b>Noversion</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOVERSION_VALUE
* @generated
* @ordered
*/
NOVERSION(0, "noversion", "noversion"),
/**
* The '<em><b>Versioned</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #VERSIONED_VALUE
* @generated
* @ordered
*/
VERSIONED(1, "versioned", "versioned"),
/**
* The '<em><b>Versionedupdate</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #VERSIONEDUPDATE_VALUE
* @generated
* @ordered
*/
VERSIONEDUPDATE(2, "versionedupdate", "versionedupdate");
/**
* The '<em><b>Noversion</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Noversion</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NOVERSION
* @model name="noversion"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='no-version'"
* @generated
* @ordered
*/
public static final int NOVERSION_VALUE = 0;
/**
* The '<em><b>Versioned</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Versioned</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #VERSIONED
* @model name="versioned"
* @generated
* @ordered
*/
public static final int VERSIONED_VALUE = 1;
/**
* The '<em><b>Versionedupdate</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Versionedupdate</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #VERSIONEDUPDATE
* @model name="versionedupdate"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='versioned-update'"
* @generated
* @ordered
*/
public static final int VERSIONEDUPDATE_VALUE = 2;
/**
* An array of all the '<em><b>Resource Version Policy</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final ResourceVersionPolicy[] VALUES_ARRAY =
new ResourceVersionPolicy[] {
NOVERSION,
VERSIONED,
VERSIONEDUPDATE,
};
/**
* A public read-only list of all the '<em><b>Resource Version Policy</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<ResourceVersionPolicy> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Resource Version Policy</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 ResourceVersionPolicy get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
ResourceVersionPolicy result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Resource Version Policy</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 ResourceVersionPolicy getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
ResourceVersionPolicy result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Resource Version Policy</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 ResourceVersionPolicy get(int value) {
switch (value) {
case NOVERSION_VALUE: return NOVERSION;
case VERSIONED_VALUE: return VERSIONED;
case VERSIONEDUPDATE_VALUE: return VERSIONEDUPDATE;
}
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 ResourceVersionPolicy(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;
}
} //ResourceVersionPolicy