|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.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 | |
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.
|
Object |
get(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(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. |
Object |
put(int key,
Object value)
Adds a new element to the target table. |
int |
put(Object key,
int value)
Adds a new element to the target table. |
Object |
put(Object key,
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(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 Object put(Object key,
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 Object put(int key,
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(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(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 Object get(Object key)
this put method.
This method is NOT synchronized: users need to manage the appropriate monitors if necessary.
key - an element identifier.public 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(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: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||