static class Entities.BinaryEntityMap extends Entities.ArrayEntityMap
growBy, names, size, values| Constructor and Description |
|---|
BinaryEntityMap()
Constructs a new instance of
BinaryEntityMap. |
BinaryEntityMap(int growBy)
Constructs a new instance of
ArrayEntityMap specifying the size by which the underlying array
should grow. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.String name,
int value)
Add an entry to this entity map.
|
private int |
binarySearch(int key)
Performs a binary search of the entity array for the specified key.
|
java.lang.String |
name(int value)
Returns the name of the entity identified by the specified value.
|
ensureCapacity, valuepublic BinaryEntityMap()
BinaryEntityMap.public BinaryEntityMap(int growBy)
ArrayEntityMap specifying the size by which the underlying array
should grow.growBy - array will be initialized to and will grow by this amountprivate int binarySearch(int key)
Arrays.key - the key to be foundpublic void add(java.lang.String name,
int value)
Add an entry to this entity map.
add in interface Entities.EntityMapadd in class Entities.ArrayEntityMapname - 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.EntityMapname in class Entities.ArrayEntityMapvalue - the value to locate