|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.strutsme.common.SafeHashtable
public final class SafeHashtable
SafeHashtable is a hash table implementation that supports null values. This is required because the Hashtable implementation from CLDC 1.0 doesn't support this.
| Constructor Summary | |
|---|---|
SafeHashtable()
Each class should have one Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears this hashtable so that it contains no keys. |
boolean |
containsKey(java.lang.Object key)
Tests if the specified object is a key in this hashtable. |
boolean |
equals(java.lang.Object obj)
|
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the specified key is mapped in this hashtable. |
int |
hashCode()
|
java.util.Enumeration |
keys()
Returns an enumeration of the keys in this hashtable. |
void |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key to the specified
value in this hashtable. |
void |
remove(java.lang.Object key)
Removes the key (and its corresponding value) from this hashtable. |
int |
size()
Returns the number of keys in this hashtable. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SafeHashtable()
| Method Detail |
|---|
public void put(java.lang.Object key,
java.lang.Object value)
key to the specified
value in this hashtable. The value can be null. The value can be retrieved by calling the
get method
with a key that is equal to the original key.
key - the hashtable key.value - the value.Object.equals(Object),
get(Object)public void remove(java.lang.Object key)
key - the key that needs to be removed.public void clear()
public int size()
public java.util.Enumeration keys()
Enumerationpublic java.lang.Object get(java.lang.Object key)
key - a key in the hashtable.
put(Object, Object)public boolean containsKey(java.lang.Object key)
key - possible key.
true if and only if the specified object
is a key in this hashtable, as determined by the
equals method; false otherwise.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||