K - type of the hashtable keysV - type of the hashtable valuesDefaultHashtable, OptimizedHashtablepublic interface IHashtable<K,V>
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Clears hashtable so that it contains no keys.
|
boolean |
contains(java.lang.Object value) |
Tests if some key maps into the specified value in the hashtable.
|
boolean |
containsKey(java.lang.Object key) |
Tests if the specified object is a key in the hashtable.
|
boolean |
containsValue(java.lang.Object value) |
Returns
true if the hashtable maps one or more keys to this value. |
java.util.Enumeration<V> |
elements() |
Returns an enumeration of the values in the hashtable.
|
V |
get(java.lang.Object key) |
Returns the value to which the specified key is mapped in the hashtable.
|
java.lang.Object |
getHashtable() |
Gets reference to the underlying hashtable
|
boolean |
isEmpty() |
Tests if the hashtable maps no keys to values.
|
java.util.Enumeration<K> |
keys() |
Returns an enumeration of the keys in the hashtable.
|
V |
put(K key,
V value) |
Maps the specified
key to the specified
value in the hashtable. |
V |
remove(java.lang.Object key) |
Removes the key (and its corresponding value) from the
hashtable.
|
void |
setHashtable(java.lang.Object hashtable) |
Sets given reference to the underlying hashtable
|
int |
size() |
Returns the number of keys in the hashtable
|
java.lang.String |
toString() |
Returns a string representation of the hashtable.
|
void clear()
boolean contains(java.lang.Object value)
value - a value to search fortrue if and only if some key maps to the
value argument in the hashtable,
false otherwiseboolean containsKey(java.lang.Object key)
key - possible keytrue if and only if the specified object
is a key in the hashtable, false otherwiseboolean containsValue(java.lang.Object value)
true if the hashtable maps one or more keys to this value.value - value whose presence in the hashtable is to be testedtrue if the hashtable maps one or more keys to the
specified value, false otherwisejava.util.Enumeration<V> elements()
V get(java.lang.Object key)
key - a key in the hashtablenull if the key is not mapped to any value in
the hashtable.boolean isEmpty()
true if the hashtable maps no keys to values,
false otherwisejava.util.Enumeration<K> keys()
V put(K key, V value)
key to the specified
value in the hashtable. Neither the key,
nor the value can be null.key - the hashtable keyvalue - the valuenull if it did not have onejava.lang.NullPointerException - if key or value is nullV remove(java.lang.Object key)
key - the key that needs to be removednull if the key did not have a mappingint size()
java.lang.String toString()
toString in class java.lang.Objectjava.lang.Object getHashtable()
void setHashtable(java.lang.Object hashtable)
hashtable - reference to the underlying hashtable