blob: 05313a224914db62f80464ed595521db39d7b907 [file] [log] [blame]
/**
* Copyright (c) 2016 CEA LIST.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* CEA LIST - Initial API and implementation
*/
package org.eclipse.papyrus.moka.fmi.fmiprofile;
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>Causality Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.papyrus.moka.fmi.fmiprofile.FMIProfilePackage#getCausalityKind()
* @model
* @generated
*/
public enum CausalityKind implements Enumerator {
/**
* The '<em><b>Parameter</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #PARAMETER_VALUE
* @generated
* @ordered
*/
PARAMETER(0, "parameter", "parameter"),
/**
* The '<em><b>Calculated Parameter</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #CALCULATED_PARAMETER_VALUE
* @generated
* @ordered
*/
CALCULATED_PARAMETER(1, "calculatedParameter", "calculatedParameter"),
/**
* The '<em><b>Input</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #INPUT_VALUE
* @generated
* @ordered
*/
INPUT(2, "input", "input"),
/**
* The '<em><b>Output</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OUTPUT_VALUE
* @generated
* @ordered
*/
OUTPUT(3, "output", "output"),
/**
* The '<em><b>Local</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #LOCAL_VALUE
* @generated
* @ordered
*/
LOCAL(4, "local", "local"),
/**
* The '<em><b>Independent</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #INDEPENDENT_VALUE
* @generated
* @ordered
*/
INDEPENDENT(5, "independent", "independent");
/**
* The '<em><b>Parameter</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Parameter</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #PARAMETER
* @model name="parameter"
* @generated
* @ordered
*/
public static final int PARAMETER_VALUE = 0;
/**
* The '<em><b>Calculated Parameter</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Calculated Parameter</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #CALCULATED_PARAMETER
* @model name="calculatedParameter"
* @generated
* @ordered
*/
public static final int CALCULATED_PARAMETER_VALUE = 1;
/**
* The '<em><b>Input</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Input</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #INPUT
* @model name="input"
* @generated
* @ordered
*/
public static final int INPUT_VALUE = 2;
/**
* The '<em><b>Output</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Output</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OUTPUT
* @model name="output"
* @generated
* @ordered
*/
public static final int OUTPUT_VALUE = 3;
/**
* The '<em><b>Local</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Local</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #LOCAL
* @model name="local"
* @generated
* @ordered
*/
public static final int LOCAL_VALUE = 4;
/**
* The '<em><b>Independent</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Independent</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #INDEPENDENT
* @model name="independent"
* @generated
* @ordered
*/
public static final int INDEPENDENT_VALUE = 5;
/**
* An array of all the '<em><b>Causality Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final CausalityKind[] VALUES_ARRAY =
new CausalityKind[] {
PARAMETER,
CALCULATED_PARAMETER,
INPUT,
OUTPUT,
LOCAL,
INDEPENDENT,
};
/**
* A public read-only list of all the '<em><b>Causality Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<CausalityKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Causality Kind</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 CausalityKind get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
CausalityKind result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Causality Kind</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 CausalityKind getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
CausalityKind result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Causality Kind</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 CausalityKind get(int value) {
switch (value) {
case PARAMETER_VALUE: return PARAMETER;
case CALCULATED_PARAMETER_VALUE: return CALCULATED_PARAMETER;
case INPUT_VALUE: return INPUT;
case OUTPUT_VALUE: return OUTPUT;
case LOCAL_VALUE: return LOCAL;
case INDEPENDENT_VALUE: return INDEPENDENT;
}
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 CausalityKind(int value, String name, String literal) {
this.value = value;
this.name = name;
this.literal = literal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getName() {
return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
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;
}
} //CausalityKind