/** | |
* Copyright (c) 2018 CEA LIST. | |
* | |
* 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: | |
* Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr | |
* - Initial API and Implementation | |
*/ | |
package org.eclipse.efm.ecore.formalml.statemachine; | |
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>Pseudostate Kind</b></em>', | |
* and utility methods for working with them. | |
* <!-- end-user-doc --> | |
* @see org.eclipse.efm.ecore.formalml.statemachine.StatemachinePackage#getPseudostateKind() | |
* @model | |
* @generated | |
*/ | |
public enum PseudostateKind implements Enumerator { | |
/** | |
* The '<em><b>Initial</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #INITIAL_VALUE | |
* @generated | |
* @ordered | |
*/ | |
INITIAL(0, "Initial", "initial"), | |
/** | |
* The '<em><b>Deep History</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #DEEP_HISTORY_VALUE | |
* @generated | |
* @ordered | |
*/ | |
DEEP_HISTORY(1, "DeepHistory", "dhistory"), | |
/** | |
* The '<em><b>Shallow History</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #SHALLOW_HISTORY_VALUE | |
* @generated | |
* @ordered | |
*/ | |
SHALLOW_HISTORY(2, "ShallowHistory", "shistory"), | |
/** | |
* The '<em><b>Join</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #JOIN_VALUE | |
* @generated | |
* @ordered | |
*/ | |
JOIN(3, "Join", "join"), | |
/** | |
* The '<em><b>Fork</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #FORK_VALUE | |
* @generated | |
* @ordered | |
*/ | |
FORK(4, "Fork", "fork"), | |
/** | |
* The '<em><b>Junction</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #JUNCTION_VALUE | |
* @generated | |
* @ordered | |
*/ | |
JUNCTION(5, "Junction", "junction"), | |
/** | |
* The '<em><b>Choice</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #CHOICE_VALUE | |
* @generated | |
* @ordered | |
*/ | |
CHOICE(6, "Choice", "choice"), | |
/** | |
* The '<em><b>Entry Point</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #ENTRY_POINT_VALUE | |
* @generated | |
* @ordered | |
*/ | |
ENTRY_POINT(7, "EntryPoint", "entryPoint"), | |
/** | |
* The '<em><b>Exit Point</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #EXIT_POINT_VALUE | |
* @generated | |
* @ordered | |
*/ | |
EXIT_POINT(8, "ExitPoint", "exitPoint"), | |
/** | |
* The '<em><b>Terminal</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #TERMINAL_VALUE | |
* @generated | |
* @ordered | |
*/ | |
TERMINAL(9, "Terminal", "terminal"), | |
/** | |
* The '<em><b>Return</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RETURN_VALUE | |
* @generated | |
* @ordered | |
*/ | |
RETURN(10, "Return", "return"); | |
/** | |
* The '<em><b>Initial</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Initial</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #INITIAL | |
* @model name="Initial" literal="initial" | |
* @generated | |
* @ordered | |
*/ | |
public static final int INITIAL_VALUE = 0; | |
/** | |
* The '<em><b>Deep History</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Deep History</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #DEEP_HISTORY | |
* @model name="DeepHistory" literal="dhistory" | |
* @generated | |
* @ordered | |
*/ | |
public static final int DEEP_HISTORY_VALUE = 1; | |
/** | |
* The '<em><b>Shallow History</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Shallow History</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #SHALLOW_HISTORY | |
* @model name="ShallowHistory" literal="shistory" | |
* @generated | |
* @ordered | |
*/ | |
public static final int SHALLOW_HISTORY_VALUE = 2; | |
/** | |
* The '<em><b>Join</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Join</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #JOIN | |
* @model name="Join" literal="join" | |
* @generated | |
* @ordered | |
*/ | |
public static final int JOIN_VALUE = 3; | |
/** | |
* The '<em><b>Fork</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Fork</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #FORK | |
* @model name="Fork" literal="fork" | |
* @generated | |
* @ordered | |
*/ | |
public static final int FORK_VALUE = 4; | |
/** | |
* The '<em><b>Junction</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Junction</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #JUNCTION | |
* @model name="Junction" literal="junction" | |
* @generated | |
* @ordered | |
*/ | |
public static final int JUNCTION_VALUE = 5; | |
/** | |
* The '<em><b>Choice</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Choice</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #CHOICE | |
* @model name="Choice" literal="choice" | |
* @generated | |
* @ordered | |
*/ | |
public static final int CHOICE_VALUE = 6; | |
/** | |
* The '<em><b>Entry Point</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Entry Point</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #ENTRY_POINT | |
* @model name="EntryPoint" literal="entryPoint" | |
* @generated | |
* @ordered | |
*/ | |
public static final int ENTRY_POINT_VALUE = 7; | |
/** | |
* The '<em><b>Exit Point</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Exit Point</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #EXIT_POINT | |
* @model name="ExitPoint" literal="exitPoint" | |
* @generated | |
* @ordered | |
*/ | |
public static final int EXIT_POINT_VALUE = 8; | |
/** | |
* The '<em><b>Terminal</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Terminal</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #TERMINAL | |
* @model name="Terminal" literal="terminal" | |
* @generated | |
* @ordered | |
*/ | |
public static final int TERMINAL_VALUE = 9; | |
/** | |
* The '<em><b>Return</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of '<em><b>Return</b></em>' literal object isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @see #RETURN | |
* @model name="Return" literal="return" | |
* @generated | |
* @ordered | |
*/ | |
public static final int RETURN_VALUE = 10; | |
/** | |
* An array of all the '<em><b>Pseudostate Kind</b></em>' enumerators. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private static final PseudostateKind[] VALUES_ARRAY = | |
new PseudostateKind[] { | |
INITIAL, | |
DEEP_HISTORY, | |
SHALLOW_HISTORY, | |
JOIN, | |
FORK, | |
JUNCTION, | |
CHOICE, | |
ENTRY_POINT, | |
EXIT_POINT, | |
TERMINAL, | |
RETURN, | |
}; | |
/** | |
* A public read-only list of all the '<em><b>Pseudostate Kind</b></em>' enumerators. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static final List<PseudostateKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); | |
/** | |
* Returns the '<em><b>Pseudostate 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 PseudostateKind get(String literal) { | |
for (int i = 0; i < VALUES_ARRAY.length; ++i) { | |
PseudostateKind result = VALUES_ARRAY[i]; | |
if (result.toString().equals(literal)) { | |
return result; | |
} | |
} | |
return null; | |
} | |
/** | |
* Returns the '<em><b>Pseudostate 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 PseudostateKind getByName(String name) { | |
for (int i = 0; i < VALUES_ARRAY.length; ++i) { | |
PseudostateKind result = VALUES_ARRAY[i]; | |
if (result.getName().equals(name)) { | |
return result; | |
} | |
} | |
return null; | |
} | |
/** | |
* Returns the '<em><b>Pseudostate 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 PseudostateKind get(int value) { | |
switch (value) { | |
case INITIAL_VALUE: return INITIAL; | |
case DEEP_HISTORY_VALUE: return DEEP_HISTORY; | |
case SHALLOW_HISTORY_VALUE: return SHALLOW_HISTORY; | |
case JOIN_VALUE: return JOIN; | |
case FORK_VALUE: return FORK; | |
case JUNCTION_VALUE: return JUNCTION; | |
case CHOICE_VALUE: return CHOICE; | |
case ENTRY_POINT_VALUE: return ENTRY_POINT; | |
case EXIT_POINT_VALUE: return EXIT_POINT; | |
case TERMINAL_VALUE: return TERMINAL; | |
case RETURN_VALUE: return RETURN; | |
} | |
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 PseudostateKind(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; | |
} | |
} //PseudostateKind |