abstract static class Entities.MapIntMap extends java.lang.Object implements Entities.EntityMap
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map |
mapNameToValue |
protected java.util.Map |
mapValueToName |
| Constructor and Description |
|---|
MapIntMap(java.util.Map nameToValue,
java.util.Map valueToName)
Construct a new instance with specified maps.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String name,
int value)
Add an entry to this entity map.
|
java.lang.String |
name(int value)
Returns the name of the entity identified by the specified value.
|
int |
value(java.lang.String name)
Returns the value of the entity identified by the specified name.
|
protected final java.util.Map mapNameToValue
protected final java.util.Map mapValueToName
MapIntMap(java.util.Map nameToValue,
java.util.Map valueToName)
nameToValue - name to value mapvalueToName - value to namee mappublic void add(java.lang.String name,
int value)
Add an entry to this entity map.
add in interface Entities.EntityMapname - the entity namevalue - the entity valuepublic java.lang.String name(int value)
Returns the name of the entity identified by the specified value.
name in interface Entities.EntityMapvalue - the value to locatepublic int value(java.lang.String name)
Returns the value of the entity identified by the specified name.
value in interface Entities.EntityMapname - the name to locate