public final class HTable
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(int key)
Returns the element identified by key, or null if none exists, or if it has
been registered using
this put method . |
java.lang.Object |
get(java.lang.Object key)
Returns the element identified by key, or null if none exists, or if it has
been registered using
this put method . |
int |
getInt(int key)
Returns the element identified by key, or Integer.MAX_VALUE if none exists,
or if it has been registered using
this put method . |
int |
getInt(java.lang.Object key)
Returns the element identified by key, or Integer.MAX_VALUE if none exists,
or if it has been registered using
this put method . |
static HTable |
newTable()
Returns a new HTable, taken from a pool of tables.
|
int |
put(int key,
int value)
Adds a new element to the target table.
|
java.lang.Object |
put(int key,
java.lang.Object value)
Adds a new element to the target table.
|
int |
put(java.lang.Object key,
int value)
Adds a new element to the target table.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Adds a new element to the target table.
|
void |
release()
Releases the target table.
|
void |
remove(int key)
Removes the element identified by the provided key from the table.
|
void |
remove(java.lang.Object key)
Removes the element identified by the provided key from the table.
|
void |
reset()
Removes all the elements from the target table.
|
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- a (non-null) key to identify the element;value
- the (non-null) value of the element;public java.lang.Object put(int key, java.lang.Object value)
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- a key to identify the element;value
- the (non-null) value of the element;public int put(java.lang.Object key, int value)
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- a (non-null) key to identify the element;value
- the value of the element;public int put(int key, int value)
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- a key to identify the element;value
- the value of the element;public void remove(java.lang.Object key)
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- the element identifier.public void remove(int key)
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- the element identifier.public java.lang.Object get(java.lang.Object key)
this put method
.
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- an element identifier.public java.lang.Object get(int key)
this put method
.
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- an element identifier.public int getInt(java.lang.Object key)
this put method
.
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- an element identifier.public int getInt(int key)
this put method
.
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key
- an element identifier.public void release()
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
public void reset()
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
public static HTable newTable()