static class Entities.ArrayEntityMap extends java.lang.Object implements Entities.EntityMap
Modifier and Type | Field and Description |
---|---|
protected int |
growBy |
protected java.lang.String[] |
names |
protected int |
size |
protected int[] |
values |
Constructor and Description |
---|
ArrayEntityMap()
Constructs a new instance of
ArrayEntityMap . |
ArrayEntityMap(int growBy)
Constructs a new instance of
ArrayEntityMap specifying the size by which the array should
grow. |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
int value)
Add an entry to this entity map.
|
protected void |
ensureCapacity(int capacity)
Verifies the capacity of the entity array, adjusting the size if necessary.
|
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 int growBy
protected int size
protected java.lang.String[] names
protected int[] values
public ArrayEntityMap()
ArrayEntityMap
.public ArrayEntityMap(int growBy)
ArrayEntityMap
specifying the size by which the array should
grow.growBy
- array will be initialized to and will grow by this amountpublic void add(java.lang.String name, int value)
Add an entry to this entity map.
add
in interface Entities.EntityMap
name
- the entity namevalue
- the entity valueprotected void ensureCapacity(int capacity)
capacity
- size the array should bepublic java.lang.String name(int value)
Returns the name of the entity identified by the specified value.
name
in interface Entities.EntityMap
value
- 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.EntityMap
name
- the name to locate
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.