blob: 3d1e880121011d37c595eaec9538c2c303c3396d [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 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:
* 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>Day Of Week Enum</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.osbp.xtext.signal.SignalDSLPackage#getDayOfWeekEnum()
* @model
* @generated
*/
public enum DayOfWeekEnum implements Enumerator {
/**
* The '<em><b>SUNDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SUNDAY_VALUE
* @generated
* @ordered
*/
SUNDAY(0, "SUNDAY", "sunday"),
/**
* The '<em><b>MONDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #MONDAY_VALUE
* @generated
* @ordered
*/
MONDAY(0, "MONDAY", "monday"),
/**
* The '<em><b>TUESDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #TUESDAY_VALUE
* @generated
* @ordered
*/
TUESDAY(0, "TUESDAY", "tuesday"),
/**
* The '<em><b>WEDNESDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #WEDNESDAY_VALUE
* @generated
* @ordered
*/
WEDNESDAY(0, "WEDNESDAY", "wednesday"),
/**
* The '<em><b>THURSDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #THURSDAY_VALUE
* @generated
* @ordered
*/
THURSDAY(0, "THURSDAY", "thursday"),
/**
* The '<em><b>FRIDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #FRIDAY_VALUE
* @generated
* @ordered
*/
FRIDAY(0, "FRIDAY", "friday"),
/**
* The '<em><b>SATURDAY</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #SATURDAY_VALUE
* @generated
* @ordered
*/
SATURDAY(0, "SATURDAY", "saturday");
/**
* The '<em><b>SUNDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>SUNDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SUNDAY
* @model literal="sunday"
* @generated
* @ordered
*/
public static final int SUNDAY_VALUE = 0;
/**
* The '<em><b>MONDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>MONDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #MONDAY
* @model literal="monday"
* @generated
* @ordered
*/
public static final int MONDAY_VALUE = 0;
/**
* The '<em><b>TUESDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>TUESDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #TUESDAY
* @model literal="tuesday"
* @generated
* @ordered
*/
public static final int TUESDAY_VALUE = 0;
/**
* The '<em><b>WEDNESDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>WEDNESDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #WEDNESDAY
* @model literal="wednesday"
* @generated
* @ordered
*/
public static final int WEDNESDAY_VALUE = 0;
/**
* The '<em><b>THURSDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>THURSDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #THURSDAY
* @model literal="thursday"
* @generated
* @ordered
*/
public static final int THURSDAY_VALUE = 0;
/**
* The '<em><b>FRIDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>FRIDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #FRIDAY
* @model literal="friday"
* @generated
* @ordered
*/
public static final int FRIDAY_VALUE = 0;
/**
* The '<em><b>SATURDAY</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>SATURDAY</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #SATURDAY
* @model literal="saturday"
* @generated
* @ordered
*/
public static final int SATURDAY_VALUE = 0;
/**
* An array of all the '<em><b>Day Of Week Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final DayOfWeekEnum[] VALUES_ARRAY =
new DayOfWeekEnum[] {
SUNDAY,
MONDAY,
TUESDAY,
WEDNESDAY,
THURSDAY,
FRIDAY,
SATURDAY,
};
/**
* A public read-only list of all the '<em><b>Day Of Week Enum</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<DayOfWeekEnum> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Day Of Week 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 DayOfWeekEnum get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DayOfWeekEnum result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Day Of Week 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 DayOfWeekEnum getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DayOfWeekEnum result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Day Of Week 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 DayOfWeekEnum get(int value) {
switch (value) {
case SUNDAY_VALUE: return SUNDAY;
}
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 DayOfWeekEnum(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;
}
} //DayOfWeekEnum