| /******************************************************************************* |
| * 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>Assertion Operator Type</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getAssertionOperatorType() |
| * @model |
| * @generated |
| */ |
| public enum AssertionOperatorType implements Enumerator { |
| /** |
| * The '<em><b>Equals</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #EQUALS_VALUE |
| * @generated |
| * @ordered |
| */ |
| EQUALS(0, "equals", "equals"), |
| |
| /** |
| * The '<em><b>Not Equals</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #NOT_EQUALS_VALUE |
| * @generated |
| * @ordered |
| */ |
| NOT_EQUALS(1, "notEquals", "notEquals"), |
| |
| /** |
| * The '<em><b>In</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #IN_VALUE |
| * @generated |
| * @ordered |
| */ |
| IN(2, "in", "in"), |
| |
| /** |
| * The '<em><b>Not In</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #NOT_IN_VALUE |
| * @generated |
| * @ordered |
| */ |
| NOT_IN(3, "notIn", "notIn"), |
| |
| /** |
| * The '<em><b>Greater Than</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #GREATER_THAN_VALUE |
| * @generated |
| * @ordered |
| */ |
| GREATER_THAN(4, "greaterThan", "greaterThan"), |
| |
| /** |
| * The '<em><b>Less Than</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #LESS_THAN_VALUE |
| * @generated |
| * @ordered |
| */ |
| LESS_THAN(5, "lessThan", "lessThan"), |
| |
| /** |
| * The '<em><b>Empty</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #EMPTY_VALUE |
| * @generated |
| * @ordered |
| */ |
| EMPTY(6, "empty", "empty"), |
| |
| /** |
| * The '<em><b>Not Empty</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #NOT_EMPTY_VALUE |
| * @generated |
| * @ordered |
| */ |
| NOT_EMPTY(7, "notEmpty", "notEmpty"), |
| |
| /** |
| * The '<em><b>Contains</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #CONTAINS_VALUE |
| * @generated |
| * @ordered |
| */ |
| CONTAINS(8, "contains", "contains"), |
| |
| /** |
| * The '<em><b>Not Contains</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #NOT_CONTAINS_VALUE |
| * @generated |
| * @ordered |
| */ |
| NOT_CONTAINS(9, "notContains", "notContains"); |
| |
| /** |
| * The '<em><b>Equals</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Equals</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #EQUALS |
| * @model name="equals" |
| * @generated |
| * @ordered |
| */ |
| public static final int EQUALS_VALUE = 0; |
| |
| /** |
| * The '<em><b>Not Equals</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Not Equals</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #NOT_EQUALS |
| * @model name="notEquals" |
| * @generated |
| * @ordered |
| */ |
| public static final int NOT_EQUALS_VALUE = 1; |
| |
| /** |
| * 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 = 2; |
| |
| /** |
| * The '<em><b>Not In</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Not In</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #NOT_IN |
| * @model name="notIn" |
| * @generated |
| * @ordered |
| */ |
| public static final int NOT_IN_VALUE = 3; |
| |
| /** |
| * The '<em><b>Greater Than</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Greater Than</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #GREATER_THAN |
| * @model name="greaterThan" |
| * @generated |
| * @ordered |
| */ |
| public static final int GREATER_THAN_VALUE = 4; |
| |
| /** |
| * The '<em><b>Less Than</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Less Than</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #LESS_THAN |
| * @model name="lessThan" |
| * @generated |
| * @ordered |
| */ |
| public static final int LESS_THAN_VALUE = 5; |
| |
| /** |
| * The '<em><b>Empty</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Empty</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #EMPTY |
| * @model name="empty" |
| * @generated |
| * @ordered |
| */ |
| public static final int EMPTY_VALUE = 6; |
| |
| /** |
| * The '<em><b>Not Empty</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Not Empty</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #NOT_EMPTY |
| * @model name="notEmpty" |
| * @generated |
| * @ordered |
| */ |
| public static final int NOT_EMPTY_VALUE = 7; |
| |
| /** |
| * 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 = 8; |
| |
| /** |
| * The '<em><b>Not Contains</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <p> |
| * If the meaning of '<em><b>Not Contains</b></em>' literal object isn't clear, |
| * there really should be more of a description here... |
| * </p> |
| * <!-- end-user-doc --> |
| * @see #NOT_CONTAINS |
| * @model name="notContains" |
| * @generated |
| * @ordered |
| */ |
| public static final int NOT_CONTAINS_VALUE = 9; |
| |
| /** |
| * An array of all the '<em><b>Assertion Operator Type</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final AssertionOperatorType[] VALUES_ARRAY = |
| new AssertionOperatorType[] { |
| EQUALS, |
| NOT_EQUALS, |
| IN, |
| NOT_IN, |
| GREATER_THAN, |
| LESS_THAN, |
| EMPTY, |
| NOT_EMPTY, |
| CONTAINS, |
| NOT_CONTAINS, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Assertion Operator Type</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<AssertionOperatorType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Assertion Operator Type</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 AssertionOperatorType get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| AssertionOperatorType result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Assertion Operator Type</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 AssertionOperatorType getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| AssertionOperatorType result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Assertion Operator Type</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 AssertionOperatorType get(int value) { |
| switch (value) { |
| case EQUALS_VALUE: return EQUALS; |
| case NOT_EQUALS_VALUE: return NOT_EQUALS; |
| case IN_VALUE: return IN; |
| case NOT_IN_VALUE: return NOT_IN; |
| case GREATER_THAN_VALUE: return GREATER_THAN; |
| case LESS_THAN_VALUE: return LESS_THAN; |
| case EMPTY_VALUE: return EMPTY; |
| case NOT_EMPTY_VALUE: return NOT_EMPTY; |
| case CONTAINS_VALUE: return CONTAINS; |
| case NOT_CONTAINS_VALUE: return NOT_CONTAINS; |
| } |
| 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 AssertionOperatorType(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; |
| } |
| |
| } //AssertionOperatorType |