public class IdentityIntMap
extends java.lang.Object
The convenience of IntMap is avoiding all the silly wrapping of integers.
Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
_keys |
private int |
_mask |
private int |
_size |
private int[] |
_values |
private static java.lang.Object |
DELETED |
static int |
NULL
Encoding of a null entry.
|
Constructor and Description |
---|
IdentityIntMap()
Create a new IntMap.
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clear the hashmap.
|
int |
get(java.lang.Object key)
Puts a new value in the property table with the appropriate flags
|
int |
put(java.lang.Object key,
int value)
Puts a new value in the property table with the appropriate flags
|
int |
remove(java.lang.Object key)
Deletes the entry.
|
private void |
resize(int newSize)
Expands the property table
|
int |
size()
Returns the current number of entries in the map.
|
java.lang.String |
toString() |
public static final int NULL
private static final java.lang.Object DELETED
private java.lang.Object[] _keys
private int[] _values
private int _size
private int _mask
public void clear()
public int size()
public int get(java.lang.Object key)
private void resize(int newSize)
public int put(java.lang.Object key, int value)
public int remove(java.lang.Object key)
public java.lang.String toString()
toString
in class java.lang.Object