/** * generated by Xtext 2.13.0 */ package com.minres.rdl.rdl; import java.util.Arrays; import java.util.Collections; import java.util.List; import org.eclipse.emf.common.util.Enumerator; /** * * A representation of the literals of the enumeration 'RValue Constant', * and utility methods for working with them. * * @see com.minres.rdl.rdl.RdlPackage#getRValueConstant() * @model * @generated */ public enum RValueConstant implements Enumerator { /** * The 'UNDEFINED' literal object. * * * @see #UNDEFINED_VALUE * @generated * @ordered */ UNDEFINED(0, "UNDEFINED", "UNDEFINED"), /** * The 'TRUE' literal object. * * * @see #TRUE_VALUE * @generated * @ordered */ TRUE(1, "TRUE", "true"), /** * The 'FALSE' literal object. * * * @see #FALSE_VALUE * @generated * @ordered */ FALSE(2, "FALSE", "false"), /** * The 'RW' literal object. * * * @see #RW_VALUE * @generated * @ordered */ RW(3, "RW", "rw"), /** * The 'WR' literal object. * * * @see #WR_VALUE * @generated * @ordered */ WR(4, "WR", "wr"), /** * The 'R' literal object. * * * @see #R_VALUE * @generated * @ordered */ R(5, "R", "r"), /** * The 'W' literal object. * * * @see #W_VALUE * @generated * @ordered */ W(6, "W", "w"), /** * The 'NA' literal object. * * * @see #NA_VALUE * @generated * @ordered */ NA(7, "NA", "na"), /** * The 'COMPACT' literal object. * * * @see #COMPACT_VALUE * @generated * @ordered */ COMPACT(8, "COMPACT", "compact"), /** * The 'REGALIGN' literal object. * * * @see #REGALIGN_VALUE * @generated * @ordered */ REGALIGN(9, "REGALIGN", "regalign"), /** * The 'FULLALIGN' literal object. * * * @see #FULLALIGN_VALUE * @generated * @ordered */ FULLALIGN(10, "FULLALIGN", "fullalign"), /** * The 'HW' literal object. * * * @see #HW_VALUE * @generated * @ordered */ HW(11, "HW", "hw"), /** * The 'SW' literal object. * * * @see #SW_VALUE * @generated * @ordered */ SW(12, "SW", "sw"); /** * The 'UNDEFINED' literal value. * *
* If the meaning of 'UNDEFINED' literal object isn't clear, * there really should be more of a description here... *
* * @see #UNDEFINED * @model * @generated * @ordered */ public static final int UNDEFINED_VALUE = 0; /** * The 'TRUE' literal value. * ** If the meaning of 'TRUE' literal object isn't clear, * there really should be more of a description here... *
* * @see #TRUE * @model literal="true" * @generated * @ordered */ public static final int TRUE_VALUE = 1; /** * The 'FALSE' literal value. * ** If the meaning of 'FALSE' literal object isn't clear, * there really should be more of a description here... *
* * @see #FALSE * @model literal="false" * @generated * @ordered */ public static final int FALSE_VALUE = 2; /** * The 'RW' literal value. * ** If the meaning of 'RW' literal object isn't clear, * there really should be more of a description here... *
* * @see #RW * @model literal="rw" * @generated * @ordered */ public static final int RW_VALUE = 3; /** * The 'WR' literal value. * ** If the meaning of 'WR' literal object isn't clear, * there really should be more of a description here... *
* * @see #WR * @model literal="wr" * @generated * @ordered */ public static final int WR_VALUE = 4; /** * The 'R' literal value. * ** If the meaning of 'R' literal object isn't clear, * there really should be more of a description here... *
* * @see #R * @model literal="r" * @generated * @ordered */ public static final int R_VALUE = 5; /** * The 'W' literal value. * ** If the meaning of 'W' literal object isn't clear, * there really should be more of a description here... *
* * @see #W * @model literal="w" * @generated * @ordered */ public static final int W_VALUE = 6; /** * The 'NA' literal value. * ** If the meaning of 'NA' literal object isn't clear, * there really should be more of a description here... *
* * @see #NA * @model literal="na" * @generated * @ordered */ public static final int NA_VALUE = 7; /** * The 'COMPACT' literal value. * ** If the meaning of 'COMPACT' literal object isn't clear, * there really should be more of a description here... *
* * @see #COMPACT * @model literal="compact" * @generated * @ordered */ public static final int COMPACT_VALUE = 8; /** * The 'REGALIGN' literal value. * ** If the meaning of 'REGALIGN' literal object isn't clear, * there really should be more of a description here... *
* * @see #REGALIGN * @model literal="regalign" * @generated * @ordered */ public static final int REGALIGN_VALUE = 9; /** * The 'FULLALIGN' literal value. * ** If the meaning of 'FULLALIGN' literal object isn't clear, * there really should be more of a description here... *
* * @see #FULLALIGN * @model literal="fullalign" * @generated * @ordered */ public static final int FULLALIGN_VALUE = 10; /** * The 'HW' literal value. * ** If the meaning of 'HW' literal object isn't clear, * there really should be more of a description here... *
* * @see #HW * @model literal="hw" * @generated * @ordered */ public static final int HW_VALUE = 11; /** * The 'SW' literal value. * ** If the meaning of 'SW' literal object isn't clear, * there really should be more of a description here... *
* * @see #SW * @model literal="sw" * @generated * @ordered */ public static final int SW_VALUE = 12; /** * An array of all the 'RValue Constant' enumerators. * * * @generated */ private static final RValueConstant[] VALUES_ARRAY = new RValueConstant[] { UNDEFINED, TRUE, FALSE, RW, WR, R, W, NA, COMPACT, REGALIGN, FULLALIGN, HW, SW, }; /** * A public read-only list of all the 'RValue Constant' enumerators. * * * @generated */ public static final Listnull
.
* @generated
*/
public static RValueConstant get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
RValueConstant result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}
/**
* Returns the 'RValue Constant' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static RValueConstant getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
RValueConstant result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}
/**
* Returns the 'RValue Constant' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static RValueConstant get(int value)
{
switch (value)
{
case UNDEFINED_VALUE: return UNDEFINED;
case TRUE_VALUE: return TRUE;
case FALSE_VALUE: return FALSE;
case RW_VALUE: return RW;
case WR_VALUE: return WR;
case R_VALUE: return R;
case W_VALUE: return W;
case NA_VALUE: return NA;
case COMPACT_VALUE: return COMPACT;
case REGALIGN_VALUE: return REGALIGN;
case FULLALIGN_VALUE: return FULLALIGN;
case HW_VALUE: return HW;
case SW_VALUE: return SW;
}
return null;
}
/**
*
*
* @generated
*/
private final int value;
/**
*
*
* @generated
*/
private final String name;
/**
*
*
* @generated
*/
private final String literal;
/**
* Only this class can construct instances.
*
*
* @generated
*/
private RValueConstant(int value, String name, String literal)
{
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
public int getValue()
{
return value;
}
/**
*
*
* @generated
*/
public String getName()
{
return name;
}
/**
*
*
* @generated
*/
public String getLiteral()
{
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString()
{
return literal;
}
} //RValueConstant