blob: a07f7f2360b9690be1eb4b531f756cce1d9ed1d7 [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>Search Modifier Code</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getSearchModifierCode()
* @model
* @generated
*/
public enum SearchModifierCode implements Enumerator {
/**
* The '<em><b>Missing</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MISSING_VALUE
* @generated
* @ordered
*/
MISSING(0, "missing", "missing"),
/**
* The '<em><b>Exact</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #EXACT_VALUE
* @generated
* @ordered
*/
EXACT(1, "exact", "exact"),
/**
* The '<em><b>Contains</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CONTAINS_VALUE
* @generated
* @ordered
*/
CONTAINS(2, "contains", "contains"),
/**
* The '<em><b>Not</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOT_VALUE
* @generated
* @ordered
*/
NOT(3, "not", "not"),
/**
* The '<em><b>Text</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TEXT_VALUE
* @generated
* @ordered
*/
TEXT(4, "text", "text"),
/**
* The '<em><b>In</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #IN_VALUE
* @generated
* @ordered
*/
IN(5, "in", "in"),
/**
* The '<em><b>Notin</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NOTIN_VALUE
* @generated
* @ordered
*/
NOTIN(6, "notin", "notin"),
/**
* The '<em><b>Below</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #BELOW_VALUE
* @generated
* @ordered
*/
BELOW(7, "below", "below"),
/**
* The '<em><b>Above</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #ABOVE_VALUE
* @generated
* @ordered
*/
ABOVE(8, "above", "above"),
/**
* The '<em><b>Type</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TYPE_VALUE
* @generated
* @ordered
*/
TYPE(9, "type", "type");
/**
* The '<em><b>Missing</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Missing</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MISSING
* @model name="missing"
* @generated
* @ordered
*/
public static final int MISSING_VALUE = 0;
/**
* The '<em><b>Exact</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Exact</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #EXACT
* @model name="exact"
* @generated
* @ordered
*/
public static final int EXACT_VALUE = 1;
/**
* The '<em><b>Contains</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Contains</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CONTAINS
* @model name="contains"
* @generated
* @ordered
*/
public static final int CONTAINS_VALUE = 2;
/**
* The '<em><b>Not</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Not</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NOT
* @model name="not"
* @generated
* @ordered
*/
public static final int NOT_VALUE = 3;
/**
* The '<em><b>Text</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Text</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TEXT
* @model name="text"
* @generated
* @ordered
*/
public static final int TEXT_VALUE = 4;
/**
* The '<em><b>In</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>In</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #IN
* @model name="in"
* @generated
* @ordered
*/
public static final int IN_VALUE = 5;
/**
* The '<em><b>Notin</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Notin</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NOTIN
* @model name="notin"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='not-in'"
* @generated
* @ordered
*/
public static final int NOTIN_VALUE = 6;
/**
* The '<em><b>Below</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Below</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #BELOW
* @model name="below"
* @generated
* @ordered
*/
public static final int BELOW_VALUE = 7;
/**
* The '<em><b>Above</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Above</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #ABOVE
* @model name="above"
* @generated
* @ordered
*/
public static final int ABOVE_VALUE = 8;
/**
* The '<em><b>Type</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Type</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TYPE
* @model name="type"
* @generated
* @ordered
*/
public static final int TYPE_VALUE = 9;
/**
* An array of all the '<em><b>Search Modifier Code</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SearchModifierCode[] VALUES_ARRAY =
new SearchModifierCode[] {
MISSING,
EXACT,
CONTAINS,
NOT,
TEXT,
IN,
NOTIN,
BELOW,
ABOVE,
TYPE,
};
/**
* A public read-only list of all the '<em><b>Search Modifier Code</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SearchModifierCode> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Search Modifier Code</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 SearchModifierCode get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SearchModifierCode result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Search Modifier Code</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 SearchModifierCode getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SearchModifierCode result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Search Modifier Code</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 SearchModifierCode get(int value) {
switch (value) {
case MISSING_VALUE: return MISSING;
case EXACT_VALUE: return EXACT;
case CONTAINS_VALUE: return CONTAINS;
case NOT_VALUE: return NOT;
case TEXT_VALUE: return TEXT;
case IN_VALUE: return IN;
case NOTIN_VALUE: return NOTIN;
case BELOW_VALUE: return BELOW;
case ABOVE_VALUE: return ABOVE;
case TYPE_VALUE: return TYPE;
}
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 SearchModifierCode(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;
}
} //SearchModifierCode