|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jonathan.libs.helpers.HTable
Implements a hash table with integer or object keys and values. Instance methods on HTable are NOT SYNCHRONIZED. It is up to the user to take the appropriate locks when necessary.
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |