public class ConstantMap
extends java.lang.Object
| Constructor and Description |
|---|
ConstantMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int constantValue,
java.lang.String constantName)
Adds a constant to the map
|
java.lang.String |
get(int constantValue)
Returns a constant name for a given constant value, if available.
|
int |
get(java.lang.String constantName,
int defaultValue)
Returns a constant value for a given constant name, if available.
|
public void add(int constantValue,
java.lang.String constantName)
constantValue - the value of the constantconstantName - the name of the constantpublic java.lang.String get(int constantValue)
constantValue - the constant valuepublic int get(java.lang.String constantName,
int defaultValue)
constantName - the constant namedefaultValue - the default value to return if a value is not found