/** */ package hu.bme.mit.inf.dslreasoner.alloyLanguage; 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 'ALS Multiplicity', * and utility methods for working with them. * * @see hu.bme.mit.inf.dslreasoner.alloyLanguage.AlloyLanguagePackage#getALSMultiplicity() * @model * @generated */ public enum ALSMultiplicity implements Enumerator { /** * The 'All' literal object. * * * @see #ALL_VALUE * @generated * @ordered */ ALL(0, "all", "all"), /** * The 'No' literal object. * * * @see #NO_VALUE * @generated * @ordered */ NO(1, "no", "no"), /** * The 'Some' literal object. * * * @see #SOME_VALUE * @generated * @ordered */ SOME(2, "some", "some"), /** * The 'Lone' literal object. * * * @see #LONE_VALUE * @generated * @ordered */ LONE(3, "lone", "lone"), /** * The 'One' literal object. * * * @see #ONE_VALUE * @generated * @ordered */ ONE(4, "one", "one"), /** * The 'Set' literal object. * * * @see #SET_VALUE * @generated * @ordered */ SET(5, "set", "set"); /** * The 'All' literal value. * *
* If the meaning of 'All' literal object isn't clear, * there really should be more of a description here... *
* * @see #ALL * @model name="all" * @generated * @ordered */ public static final int ALL_VALUE = 0; /** * The 'No' literal value. * ** If the meaning of 'No' literal object isn't clear, * there really should be more of a description here... *
* * @see #NO * @model name="no" * @generated * @ordered */ public static final int NO_VALUE = 1; /** * The 'Some' literal value. * ** If the meaning of 'Some' literal object isn't clear, * there really should be more of a description here... *
* * @see #SOME * @model name="some" * @generated * @ordered */ public static final int SOME_VALUE = 2; /** * The 'Lone' literal value. * ** If the meaning of 'Lone' literal object isn't clear, * there really should be more of a description here... *
* * @see #LONE * @model name="lone" * @generated * @ordered */ public static final int LONE_VALUE = 3; /** * The 'One' literal value. * ** If the meaning of 'One' literal object isn't clear, * there really should be more of a description here... *
* * @see #ONE * @model name="one" * @generated * @ordered */ public static final int ONE_VALUE = 4; /** * The 'Set' literal value. * ** If the meaning of 'Set' literal object isn't clear, * there really should be more of a description here... *
* * @see #SET * @model name="set" * @generated * @ordered */ public static final int SET_VALUE = 5; /** * An array of all the 'ALS Multiplicity' enumerators. * * * @generated */ private static final ALSMultiplicity[] VALUES_ARRAY = new ALSMultiplicity[] { ALL, NO, SOME, LONE, ONE, SET, }; /** * A public read-only list of all the 'ALS Multiplicity' enumerators. * * * @generated */ public static final Listnull
.
* @generated
*/
public static ALSMultiplicity get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
ALSMultiplicity result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}
/**
* Returns the 'ALS Multiplicity' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static ALSMultiplicity getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
ALSMultiplicity result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}
/**
* Returns the 'ALS Multiplicity' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static ALSMultiplicity get(int value)
{
switch (value)
{
case ALL_VALUE: return ALL;
case NO_VALUE: return NO;
case SOME_VALUE: return SOME;
case LONE_VALUE: return LONE;
case ONE_VALUE: return ONE;
case SET_VALUE: return SET;
}
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 ALSMultiplicity(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;
}
} //ALSMultiplicity