blob: 25a75cccf82750040dcd9d3e0e53b18d0d8ecb66 [file] [log] [blame]
/**
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* 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:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
* generated from ActionDSL.xcore
*
*
*/
package org.eclipse.osbp.xtext.action;
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>Task Action Enum</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.osbp.xtext.action.ActionDSLPackage#getTaskActionEnum()
* @model
* @generated
*/
public enum TaskActionEnum implements Enumerator {
/**
* The '<em><b>TASK ACTION CLAIM</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_CLAIM_VALUE
* @generated
* @ordered
*/
TASK_ACTION_CLAIM(0, "TASK_ACTION_CLAIM", "Claim"),
/**
* The '<em><b>TASK ACTION START</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_START_VALUE
* @generated
* @ordered
*/
TASK_ACTION_START(1, "TASK_ACTION_START", "Start"),
/**
* The '<em><b>TASK ACTION STOP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_STOP_VALUE
* @generated
* @ordered
*/
TASK_ACTION_STOP(2, "TASK_ACTION_STOP", "Stop"),
/**
* The '<em><b>TASK ACTION RELEASE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_RELEASE_VALUE
* @generated
* @ordered
*/
TASK_ACTION_RELEASE(3, "TASK_ACTION_RELEASE", "Release"),
/**
* The '<em><b>TASK ACTION SUSPEND</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_SUSPEND_VALUE
* @generated
* @ordered
*/
TASK_ACTION_SUSPEND(4, "TASK_ACTION_SUSPEND", "Suspend"),
/**
* The '<em><b>TASK ACTION RESUME</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_RESUME_VALUE
* @generated
* @ordered
*/
TASK_ACTION_RESUME(5, "TASK_ACTION_RESUME", "Resume"),
/**
* The '<em><b>TASK ACTION SKIP</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_SKIP_VALUE
* @generated
* @ordered
*/
TASK_ACTION_SKIP(6, "TASK_ACTION_SKIP", "Skip"),
/**
* The '<em><b>TASK ACTION COMPLETE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_COMPLETE_VALUE
* @generated
* @ordered
*/
TASK_ACTION_COMPLETE(7, "TASK_ACTION_COMPLETE", "Complete"),
/**
* The '<em><b>TASK ACTION DELEGATE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_DELEGATE_VALUE
* @generated
* @ordered
*/
TASK_ACTION_DELEGATE(8, "TASK_ACTION_DELEGATE", "Delegate"),
/**
* The '<em><b>TASK ACTION FORWARD</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_FORWARD_VALUE
* @generated
* @ordered
*/
TASK_ACTION_FORWARD(9, "TASK_ACTION_FORWARD", "Forward"),
/**
* The '<em><b>TASK ACTION FAIL</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_FAIL_VALUE
* @generated
* @ordered
*/
TASK_ACTION_FAIL(10, "TASK_ACTION_FAIL", "Fail"),
/**
* The '<em><b>TASK ACTION REGISTER</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_REGISTER_VALUE
* @generated
* @ordered
*/
TASK_ACTION_REGISTER(11, "TASK_ACTION_REGISTER", "Register"),
/**
* The '<em><b>TASK ACTION REMOVE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_REMOVE_VALUE
* @generated
* @ordered
*/
TASK_ACTION_REMOVE(12, "TASK_ACTION_REMOVE", "Remove"),
/**
* The '<em><b>TASK ACTION ACTIVATE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_ACTIVATE_VALUE
* @generated
* @ordered
*/
TASK_ACTION_ACTIVATE(13, "TASK_ACTION_ACTIVATE", "Activate"),
/**
* The '<em><b>TASK ACTION EXIT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TASK_ACTION_EXIT_VALUE
* @generated
* @ordered
*/
TASK_ACTION_EXIT(14, "TASK_ACTION_EXIT", "Exit");
/**
* The '<em><b>TASK ACTION CLAIM</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION CLAIM</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_CLAIM
* @model literal="Claim"
* @generated
* @ordered
*/
public static final int TASK_ACTION_CLAIM_VALUE = 0;
/**
* The '<em><b>TASK ACTION START</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION START</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_START
* @model literal="Start"
* @generated
* @ordered
*/
public static final int TASK_ACTION_START_VALUE = 1;
/**
* The '<em><b>TASK ACTION STOP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION STOP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_STOP
* @model literal="Stop"
* @generated
* @ordered
*/
public static final int TASK_ACTION_STOP_VALUE = 2;
/**
* The '<em><b>TASK ACTION RELEASE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION RELEASE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_RELEASE
* @model literal="Release"
* @generated
* @ordered
*/
public static final int TASK_ACTION_RELEASE_VALUE = 3;
/**
* The '<em><b>TASK ACTION SUSPEND</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION SUSPEND</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_SUSPEND
* @model literal="Suspend"
* @generated
* @ordered
*/
public static final int TASK_ACTION_SUSPEND_VALUE = 4;
/**
* The '<em><b>TASK ACTION RESUME</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION RESUME</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_RESUME
* @model literal="Resume"
* @generated
* @ordered
*/
public static final int TASK_ACTION_RESUME_VALUE = 5;
/**
* The '<em><b>TASK ACTION SKIP</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION SKIP</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_SKIP
* @model literal="Skip"
* @generated
* @ordered
*/
public static final int TASK_ACTION_SKIP_VALUE = 6;
/**
* The '<em><b>TASK ACTION COMPLETE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION COMPLETE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_COMPLETE
* @model literal="Complete"
* @generated
* @ordered
*/
public static final int TASK_ACTION_COMPLETE_VALUE = 7;
/**
* The '<em><b>TASK ACTION DELEGATE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION DELEGATE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_DELEGATE
* @model literal="Delegate"
* @generated
* @ordered
*/
public static final int TASK_ACTION_DELEGATE_VALUE = 8;
/**
* The '<em><b>TASK ACTION FORWARD</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION FORWARD</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_FORWARD
* @model literal="Forward"
* @generated
* @ordered
*/
public static final int TASK_ACTION_FORWARD_VALUE = 9;
/**
* The '<em><b>TASK ACTION FAIL</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION FAIL</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_FAIL
* @model literal="Fail"
* @generated
* @ordered
*/
public static final int TASK_ACTION_FAIL_VALUE = 10;
/**
* The '<em><b>TASK ACTION REGISTER</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION REGISTER</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_REGISTER
* @model literal="Register"
* @generated
* @ordered
*/
public static final int TASK_ACTION_REGISTER_VALUE = 11;
/**
* The '<em><b>TASK ACTION REMOVE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION REMOVE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_REMOVE
* @model literal="Remove"
* @generated
* @ordered
*/
public static final int TASK_ACTION_REMOVE_VALUE = 12;
/**
* The '<em><b>TASK ACTION ACTIVATE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION ACTIVATE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_ACTIVATE
* @model literal="Activate"
* @generated
* @ordered
*/
public static final int TASK_ACTION_ACTIVATE_VALUE = 13;
/**
* The '<em><b>TASK ACTION EXIT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TASK ACTION EXIT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TASK_ACTION_EXIT
* @model literal="Exit"
* @generated
* @ordered
*/
public static final int TASK_ACTION_EXIT_VALUE = 14;
/**
* An array of all the '<em><b>Task Action Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final TaskActionEnum[] VALUES_ARRAY =
new TaskActionEnum[] {
TASK_ACTION_CLAIM,
TASK_ACTION_START,
TASK_ACTION_STOP,
TASK_ACTION_RELEASE,
TASK_ACTION_SUSPEND,
TASK_ACTION_RESUME,
TASK_ACTION_SKIP,
TASK_ACTION_COMPLETE,
TASK_ACTION_DELEGATE,
TASK_ACTION_FORWARD,
TASK_ACTION_FAIL,
TASK_ACTION_REGISTER,
TASK_ACTION_REMOVE,
TASK_ACTION_ACTIVATE,
TASK_ACTION_EXIT,
};
/**
* A public read-only list of all the '<em><b>Task Action Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<TaskActionEnum> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Task Action Enum</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 TaskActionEnum get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
TaskActionEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Task Action Enum</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 TaskActionEnum getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
TaskActionEnum result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Task Action Enum</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 TaskActionEnum get(int value) {
switch (value) {
case TASK_ACTION_CLAIM_VALUE: return TASK_ACTION_CLAIM;
case TASK_ACTION_START_VALUE: return TASK_ACTION_START;
case TASK_ACTION_STOP_VALUE: return TASK_ACTION_STOP;
case TASK_ACTION_RELEASE_VALUE: return TASK_ACTION_RELEASE;
case TASK_ACTION_SUSPEND_VALUE: return TASK_ACTION_SUSPEND;
case TASK_ACTION_RESUME_VALUE: return TASK_ACTION_RESUME;
case TASK_ACTION_SKIP_VALUE: return TASK_ACTION_SKIP;
case TASK_ACTION_COMPLETE_VALUE: return TASK_ACTION_COMPLETE;
case TASK_ACTION_DELEGATE_VALUE: return TASK_ACTION_DELEGATE;
case TASK_ACTION_FORWARD_VALUE: return TASK_ACTION_FORWARD;
case TASK_ACTION_FAIL_VALUE: return TASK_ACTION_FAIL;
case TASK_ACTION_REGISTER_VALUE: return TASK_ACTION_REGISTER;
case TASK_ACTION_REMOVE_VALUE: return TASK_ACTION_REMOVE;
case TASK_ACTION_ACTIVATE_VALUE: return TASK_ACTION_ACTIVATE;
case TASK_ACTION_EXIT_VALUE: return TASK_ACTION_EXIT;
}
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 TaskActionEnum(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;
}
} //TaskActionEnum