/**
* generated by Xtext 2.26.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 'Property Modifier',
* and utility methods for working with them.
*
* @see com.minres.rdl.rdl.RdlPackage#getPropertyModifier()
* @model
* @generated
*/
public enum PropertyModifier implements Enumerator
{
/**
* The 'UNDEFINED' literal object.
*
*
* @see #UNDEFINED_VALUE
* @generated
* @ordered
*/
UNDEFINED(0, "UNDEFINED", "UNDEFINED"),
/**
* The 'POSEDGE' literal object.
*
*
* @see #POSEDGE_VALUE
* @generated
* @ordered
*/
POSEDGE(1, "POSEDGE", "posedge"),
/**
* The 'NEGEDGE' literal object.
*
*
* @see #NEGEDGE_VALUE
* @generated
* @ordered
*/
NEGEDGE(2, "NEGEDGE", "negedge"),
/**
* The 'BOTHEDGE' literal object.
*
*
* @see #BOTHEDGE_VALUE
* @generated
* @ordered
*/
BOTHEDGE(3, "BOTHEDGE", "bothedge"),
/**
* The 'LEVEL' literal object.
*
*
* @see #LEVEL_VALUE
* @generated
* @ordered
*/
LEVEL(4, "LEVEL", "level"),
/**
* The 'NONSTICKY' literal object.
*
*
* @see #NONSTICKY_VALUE
* @generated
* @ordered
*/
NONSTICKY(5, "NONSTICKY", "nonsticky");
/**
* The 'UNDEFINED' literal value.
*
*
* @see #UNDEFINED
* @model
* @generated
* @ordered
*/
public static final int UNDEFINED_VALUE = 0;
/**
* The 'POSEDGE' literal value.
*
*
* @see #POSEDGE
* @model literal="posedge"
* @generated
* @ordered
*/
public static final int POSEDGE_VALUE = 1;
/**
* The 'NEGEDGE' literal value.
*
*
* @see #NEGEDGE
* @model literal="negedge"
* @generated
* @ordered
*/
public static final int NEGEDGE_VALUE = 2;
/**
* The 'BOTHEDGE' literal value.
*
*
* @see #BOTHEDGE
* @model literal="bothedge"
* @generated
* @ordered
*/
public static final int BOTHEDGE_VALUE = 3;
/**
* The 'LEVEL' literal value.
*
*
* @see #LEVEL
* @model literal="level"
* @generated
* @ordered
*/
public static final int LEVEL_VALUE = 4;
/**
* The 'NONSTICKY' literal value.
*
*
* @see #NONSTICKY
* @model literal="nonsticky"
* @generated
* @ordered
*/
public static final int NONSTICKY_VALUE = 5;
/**
* An array of all the 'Property Modifier' enumerators.
*
*
* @generated
*/
private static final PropertyModifier[] VALUES_ARRAY =
new PropertyModifier[]
{
UNDEFINED,
POSEDGE,
NEGEDGE,
BOTHEDGE,
LEVEL,
NONSTICKY,
};
/**
* A public read-only list of all the 'Property Modifier' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Property Modifier' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static PropertyModifier get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
PropertyModifier result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}
/**
* Returns the 'Property Modifier' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static PropertyModifier getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
PropertyModifier result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}
/**
* Returns the 'Property Modifier' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static PropertyModifier get(int value)
{
switch (value)
{
case UNDEFINED_VALUE: return UNDEFINED;
case POSEDGE_VALUE: return POSEDGE;
case NEGEDGE_VALUE: return NEGEDGE;
case BOTHEDGE_VALUE: return BOTHEDGE;
case LEVEL_VALUE: return LEVEL;
case NONSTICKY_VALUE: return NONSTICKY;
}
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 PropertyModifier(int value, String name, String literal)
{
this.value = value;
this.name = name;
this.literal = literal;
}
/**
*
*
* @generated
*/
@Override
public int getValue()
{
return value;
}
/**
*
*
* @generated
*/
@Override
public String getName()
{
return name;
}
/**
*
*
* @generated
*/
@Override
public String getLiteral()
{
return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
*
*
* @generated
*/
@Override
public String toString()
{
return literal;
}
} //PropertyModifier