org.contextmapper.dsl.contextMappingDSL.DownstreamGovernanceRights Maven / Gradle / Ivy
/**
* generated by Xtext 2.21.0
*/
package org.contextmapper.dsl.contextMappingDSL;
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 'Downstream Governance Rights',
* and utility methods for working with them.
*
* @see org.contextmapper.dsl.contextMappingDSL.ContextMappingDSLPackage#getDownstreamGovernanceRights()
* @model
* @generated
*/
public enum DownstreamGovernanceRights implements Enumerator
{
/**
* The 'INFLUENCER' literal object.
*
*
* @see #INFLUENCER_VALUE
* @generated
* @ordered
*/
INFLUENCER(0, "INFLUENCER", "INFLUENCER"),
/**
* The 'OPINION LEADER' literal object.
*
*
* @see #OPINION_LEADER_VALUE
* @generated
* @ordered
*/
OPINION_LEADER(1, "OPINION_LEADER", "OPINION_LEADER"),
/**
* The 'VETO RIGHT' literal object.
*
*
* @see #VETO_RIGHT_VALUE
* @generated
* @ordered
*/
VETO_RIGHT(2, "VETO_RIGHT", "VETO_RIGHT"),
/**
* The 'DECISION MAKER' literal object.
*
*
* @see #DECISION_MAKER_VALUE
* @generated
* @ordered
*/
DECISION_MAKER(3, "DECISION_MAKER", "DECISION_MAKER"),
/**
* The 'MONOPOLIST' literal object.
*
*
* @see #MONOPOLIST_VALUE
* @generated
* @ordered
*/
MONOPOLIST(4, "MONOPOLIST", "MONOPOLIST");
/**
* The 'INFLUENCER' literal value.
*
*
* @see #INFLUENCER
* @model
* @generated
* @ordered
*/
public static final int INFLUENCER_VALUE = 0;
/**
* The 'OPINION LEADER' literal value.
*
*
* @see #OPINION_LEADER
* @model
* @generated
* @ordered
*/
public static final int OPINION_LEADER_VALUE = 1;
/**
* The 'VETO RIGHT' literal value.
*
*
* @see #VETO_RIGHT
* @model
* @generated
* @ordered
*/
public static final int VETO_RIGHT_VALUE = 2;
/**
* The 'DECISION MAKER' literal value.
*
*
* @see #DECISION_MAKER
* @model
* @generated
* @ordered
*/
public static final int DECISION_MAKER_VALUE = 3;
/**
* The 'MONOPOLIST' literal value.
*
*
* @see #MONOPOLIST
* @model
* @generated
* @ordered
*/
public static final int MONOPOLIST_VALUE = 4;
/**
* An array of all the 'Downstream Governance Rights' enumerators.
*
*
* @generated
*/
private static final DownstreamGovernanceRights[] VALUES_ARRAY =
new DownstreamGovernanceRights[]
{
INFLUENCER,
OPINION_LEADER,
VETO_RIGHT,
DECISION_MAKER,
MONOPOLIST,
};
/**
* A public read-only list of all the 'Downstream Governance Rights' enumerators.
*
*
* @generated
*/
public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the 'Downstream Governance Rights' literal with the specified literal value.
*
*
* @param literal the literal.
* @return the matching enumerator or null
.
* @generated
*/
public static DownstreamGovernanceRights get(String literal)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
DownstreamGovernanceRights result = VALUES_ARRAY[i];
if (result.toString().equals(literal))
{
return result;
}
}
return null;
}
/**
* Returns the 'Downstream Governance Rights' literal with the specified name.
*
*
* @param name the name.
* @return the matching enumerator or null
.
* @generated
*/
public static DownstreamGovernanceRights getByName(String name)
{
for (int i = 0; i < VALUES_ARRAY.length; ++i)
{
DownstreamGovernanceRights result = VALUES_ARRAY[i];
if (result.getName().equals(name))
{
return result;
}
}
return null;
}
/**
* Returns the 'Downstream Governance Rights' literal with the specified integer value.
*
*
* @param value the integer value.
* @return the matching enumerator or null
.
* @generated
*/
public static DownstreamGovernanceRights get(int value)
{
switch (value)
{
case INFLUENCER_VALUE: return INFLUENCER;
case OPINION_LEADER_VALUE: return OPINION_LEADER;
case VETO_RIGHT_VALUE: return VETO_RIGHT;
case DECISION_MAKER_VALUE: return DECISION_MAKER;
case MONOPOLIST_VALUE: return MONOPOLIST;
}
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 DownstreamGovernanceRights(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;
}
} //DownstreamGovernanceRights