Alachisoft.NCache.Parser.Action Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nc-parser Show documentation
Show all versions of nc-parser Show documentation
Internal package of Alachisoft.
package Alachisoft.NCache.Parser;
/**
* constants associated with what action should be performed
*/
public enum Action {
/**
*
*/
Shift(1),
/**
*
*/
Reduce(2),
/**
*
*/
Goto(3),
/**
*
*/
Accept(4),
/**
*
*/
Error(5);
private static java.util.HashMap mappings;
private int intValue;
private Action(int value) {
intValue = value;
Action.getMappings().put(value, this);
}
private static java.util.HashMap getMappings() {
if (mappings == null) {
synchronized (Action.class) {
if (mappings == null) {
mappings = new java.util.HashMap();
}
}
}
return mappings;
}
public static Action forValue(int value) {
return getMappings().get(value);
}
public int getValue() {
return intValue;
}
}