/** | |
* Copyright (c) 2020 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\n\nContributors: | |
* Arnault Lapitre (CEA LIST) arnault.lapitre@cea.fr | |
* - Initial API and Implementation | |
*/ | |
package org.eclipse.efm.ecore.formalml.statement; | |
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>Activity Statement Kind</b></em>', | |
* and utility methods for working with them. | |
* <!-- end-user-doc --> | |
* @see org.eclipse.efm.ecore.formalml.statement.StatementPackage#getActivityStatementKind() | |
* @model | |
* @generated | |
*/ | |
public enum ActivityStatementKind implements Enumerator { | |
/** | |
* The '<em><b>Init</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #INIT_VALUE | |
* @generated | |
* @ordered | |
*/ | |
INIT(0, "init", "init"), | |
/** | |
* The '<em><b>Final</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #FINAL_VALUE | |
* @generated | |
* @ordered | |
*/ | |
FINAL(1, "final", "final"), | |
/** | |
* The '<em><b>New</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #NEW_VALUE | |
* @generated | |
* @ordered | |
*/ | |
NEW(2, "new", "new"), /** | |
* The '<em><b>Destroy</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #DESTROY_VALUE | |
* @generated | |
* @ordered | |
*/ | |
DESTROY(3, "destroy", "destroy"), | |
/** | |
* The '<em><b>Start</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #START_VALUE | |
* @generated | |
* @ordered | |
*/ | |
START(4, "start", "start"), | |
/** | |
* The '<em><b>Stop</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #STOP_VALUE | |
* @generated | |
* @ordered | |
*/ | |
STOP(5, "stop", "stop"), | |
/** | |
* The '<em><b>Restart</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RESTART_VALUE | |
* @generated | |
* @ordered | |
*/ | |
RESTART(6, "restart", "restart"), | |
/** | |
* The '<em><b>Suspend</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #SUSPEND_VALUE | |
* @generated | |
* @ordered | |
*/ | |
SUSPEND(7, "suspend", "suspend"), | |
/** | |
* The '<em><b>Resume</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RESUME_VALUE | |
* @generated | |
* @ordered | |
*/ | |
RESUME(8, "resume", "resume"), | |
/** | |
* The '<em><b>Wait</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #WAIT_VALUE | |
* @generated | |
* @ordered | |
*/ | |
WAIT(9, "wait", "wait"), | |
/** | |
* The '<em><b>Abort</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #ABORT_VALUE | |
* @generated | |
* @ordered | |
*/ | |
ABORT(10, "abort", "abort"), | |
/** | |
* The '<em><b>Disable</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #DISABLE_VALUE | |
* @generated | |
* @ordered | |
*/ | |
DISABLE(10, "disable", "disable"), | |
/** | |
* The '<em><b>Enable</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #ENABLE_VALUE | |
* @generated | |
* @ordered | |
*/ | |
ENABLE(12, "enable", "enable"), | |
/** | |
* The '<em><b>Goto</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #GOTO_VALUE | |
* @generated | |
* @ordered | |
*/ | |
GOTO(13, "goto", "goto"), /** | |
* The '<em><b>Schedule</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #SCHEDULE_VALUE | |
* @generated | |
* @ordered | |
*/ | |
SCHEDULE(14, "schedule", "schedule"), /** | |
* The '<em><b>Irun</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #IRUN_VALUE | |
* @generated | |
* @ordered | |
*/ | |
IRUN(15, "irun", "irun"), /** | |
* The '<em><b>Run</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RUN_VALUE | |
* @generated | |
* @ordered | |
*/ | |
RUN(16, "run", "run"), /** | |
* The '<em><b>Rtc</b></em>' literal object. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RTC_VALUE | |
* @generated | |
* @ordered | |
*/ | |
RTC(17, "rtc", "rtc"); | |
/** | |
* The '<em><b>Init</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #INIT | |
* @model name="init" | |
* @generated | |
* @ordered | |
*/ | |
public static final int INIT_VALUE = 0; | |
/** | |
* The '<em><b>Final</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #FINAL | |
* @model name="final" | |
* @generated | |
* @ordered | |
*/ | |
public static final int FINAL_VALUE = 1; | |
/** | |
* The '<em><b>New</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #NEW | |
* @model name="new" | |
* @generated | |
* @ordered | |
*/ | |
public static final int NEW_VALUE = 2; | |
/** | |
* The '<em><b>Destroy</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #DESTROY | |
* @model name="destroy" | |
* @generated | |
* @ordered | |
*/ | |
public static final int DESTROY_VALUE = 3; | |
/** | |
* The '<em><b>Start</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #START | |
* @model name="start" | |
* @generated | |
* @ordered | |
*/ | |
public static final int START_VALUE = 4; | |
/** | |
* The '<em><b>Stop</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #STOP | |
* @model name="stop" | |
* @generated | |
* @ordered | |
*/ | |
public static final int STOP_VALUE = 5; | |
/** | |
* The '<em><b>Restart</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RESTART | |
* @model name="restart" | |
* @generated | |
* @ordered | |
*/ | |
public static final int RESTART_VALUE = 6; | |
/** | |
* The '<em><b>Suspend</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #SUSPEND | |
* @model name="suspend" | |
* @generated | |
* @ordered | |
*/ | |
public static final int SUSPEND_VALUE = 7; | |
/** | |
* The '<em><b>Resume</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RESUME | |
* @model name="resume" | |
* @generated | |
* @ordered | |
*/ | |
public static final int RESUME_VALUE = 8; | |
/** | |
* The '<em><b>Wait</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #WAIT | |
* @model name="wait" | |
* @generated | |
* @ordered | |
*/ | |
public static final int WAIT_VALUE = 9; | |
/** | |
* The '<em><b>Abort</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #ABORT | |
* @model name="abort" | |
* @generated | |
* @ordered | |
*/ | |
public static final int ABORT_VALUE = 10; | |
/** | |
* The '<em><b>Disable</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #DISABLE | |
* @model name="disable" | |
* @generated | |
* @ordered | |
*/ | |
public static final int DISABLE_VALUE = 10; | |
/** | |
* The '<em><b>Enable</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #ENABLE | |
* @model name="enable" | |
* @generated | |
* @ordered | |
*/ | |
public static final int ENABLE_VALUE = 12; | |
/** | |
* The '<em><b>Goto</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #GOTO | |
* @model name="goto" | |
* @generated | |
* @ordered | |
*/ | |
public static final int GOTO_VALUE = 13; | |
/** | |
* The '<em><b>Schedule</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #SCHEDULE | |
* @model name="schedule" | |
* @generated | |
* @ordered | |
*/ | |
public static final int SCHEDULE_VALUE = 14; | |
/** | |
* The '<em><b>Irun</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #IRUN | |
* @model name="irun" | |
* @generated | |
* @ordered | |
*/ | |
public static final int IRUN_VALUE = 15; | |
/** | |
* The '<em><b>Run</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RUN | |
* @model name="run" | |
* @generated | |
* @ordered | |
*/ | |
public static final int RUN_VALUE = 16; | |
/** | |
* The '<em><b>Rtc</b></em>' literal value. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @see #RTC | |
* @model name="rtc" | |
* @generated | |
* @ordered | |
*/ | |
public static final int RTC_VALUE = 17; | |
/** | |
* An array of all the '<em><b>Activity Statement Kind</b></em>' enumerators. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
private static final ActivityStatementKind[] VALUES_ARRAY = | |
new ActivityStatementKind[] { | |
INIT, | |
FINAL, | |
NEW, | |
DESTROY, | |
START, | |
STOP, | |
RESTART, | |
SUSPEND, | |
RESUME, | |
WAIT, | |
ABORT, | |
DISABLE, | |
ENABLE, | |
GOTO, | |
SCHEDULE, | |
IRUN, | |
RUN, | |
RTC, | |
}; | |
/** | |
* A public read-only list of all the '<em><b>Activity Statement Kind</b></em>' enumerators. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @generated | |
*/ | |
public static final List<ActivityStatementKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); | |
/** | |
* Returns the '<em><b>Activity Statement 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 ActivityStatementKind get(String literal) { | |
for (int i = 0; i < VALUES_ARRAY.length; ++i) { | |
ActivityStatementKind result = VALUES_ARRAY[i]; | |
if (result.toString().equals(literal)) { | |
return result; | |
} | |
} | |
return null; | |
} | |
/** | |
* Returns the '<em><b>Activity Statement 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 ActivityStatementKind getByName(String name) { | |
for (int i = 0; i < VALUES_ARRAY.length; ++i) { | |
ActivityStatementKind result = VALUES_ARRAY[i]; | |
if (result.getName().equals(name)) { | |
return result; | |
} | |
} | |
return null; | |
} | |
/** | |
* Returns the '<em><b>Activity Statement 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 ActivityStatementKind get(int value) { | |
switch (value) { | |
case INIT_VALUE: return INIT; | |
case FINAL_VALUE: return FINAL; | |
case NEW_VALUE: return NEW; | |
case DESTROY_VALUE: return DESTROY; | |
case START_VALUE: return START; | |
case STOP_VALUE: return STOP; | |
case RESTART_VALUE: return RESTART; | |
case SUSPEND_VALUE: return SUSPEND; | |
case RESUME_VALUE: return RESUME; | |
case WAIT_VALUE: return WAIT; | |
case ABORT_VALUE: return ABORT; | |
case ENABLE_VALUE: return ENABLE; | |
case GOTO_VALUE: return GOTO; | |
case SCHEDULE_VALUE: return SCHEDULE; | |
case IRUN_VALUE: return IRUN; | |
case RUN_VALUE: return RUN; | |
case RTC_VALUE: return RTC; | |
} | |
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 ActivityStatementKind(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; | |
} | |
} //ActivityStatementKind |