blob: 89d1a7d142bb7bf640af9014d49768d5fe3157d3 [file] [log] [blame]
/**
* Copyright (c) 2011, 2018 - 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 SignalDSL.xcore
*
*
*/
package org.eclipse.osbp.xtext.signal;
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>Signal Action Enum</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.osbp.xtext.signal.SignalDSLPackage#getSignalActionEnum()
* @model
* @generated
*/
public enum SignalActionEnum implements Enumerator {
/**
* The '<em><b>DATAIMPORT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #DATAIMPORT_VALUE
* @generated
* @ordered
*/
DATAIMPORT(0, "DATAIMPORT", "dataimport"),
/**
* The '<em><b>PDFPRINT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #PDFPRINT_VALUE
* @generated
* @ordered
*/
PDFPRINT(0, "PDFPRINT", "pdfprint"),
/**
* The '<em><b>PRINT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #PRINT_VALUE
* @generated
* @ordered
*/
PRINT(0, "PRINT", "print"),
/**
* The '<em><b>MAIL</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MAIL_VALUE
* @generated
* @ordered
*/
MAIL(0, "MAIL", "mail"),
/**
* The '<em><b>MESSAGEPROMPT</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MESSAGEPROMPT_VALUE
* @generated
* @ordered
*/
MESSAGEPROMPT(0, "MESSAGEPROMPT", "showinfo"),
/**
* The '<em><b>NONE</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #NONE_VALUE
* @generated
* @ordered
*/
NONE(0, "NONE", "none");
/**
* The '<em><b>DATAIMPORT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>DATAIMPORT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #DATAIMPORT
* @model literal="dataimport"
* @generated
* @ordered
*/
public static final int DATAIMPORT_VALUE = 0;
/**
* The '<em><b>PDFPRINT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>PDFPRINT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #PDFPRINT
* @model literal="pdfprint"
* @generated
* @ordered
*/
public static final int PDFPRINT_VALUE = 0;
/**
* The '<em><b>PRINT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>PRINT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #PRINT
* @model literal="print"
* @generated
* @ordered
*/
public static final int PRINT_VALUE = 0;
/**
* The '<em><b>MAIL</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>MAIL</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MAIL
* @model literal="mail"
* @generated
* @ordered
*/
public static final int MAIL_VALUE = 0;
/**
* The '<em><b>MESSAGEPROMPT</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>MESSAGEPROMPT</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MESSAGEPROMPT
* @model literal="showinfo"
* @generated
* @ordered
*/
public static final int MESSAGEPROMPT_VALUE = 0;
/**
* The '<em><b>NONE</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>NONE</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #NONE
* @model literal="none"
* @generated
* @ordered
*/
public static final int NONE_VALUE = 0;
/**
* An array of all the '<em><b>Signal Action Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final SignalActionEnum[] VALUES_ARRAY =
new SignalActionEnum[] {
DATAIMPORT,
PDFPRINT,
PRINT,
MAIL,
MESSAGEPROMPT,
NONE,
};
/**
* A public read-only list of all the '<em><b>Signal Action Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<SignalActionEnum> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Signal 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 SignalActionEnum get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SignalActionEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Signal 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 SignalActionEnum getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
SignalActionEnum result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Signal 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 SignalActionEnum get(int value) {
switch (value) {
case DATAIMPORT_VALUE: return DATAIMPORT;
}
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 SignalActionEnum(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;
}
} //SignalActionEnum