|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.tinyline.tiny2d.TinyHash
The TinyHash class implements a hashtable,
which maps keys to values.
| Constructor Summary | |
TinyHash(int i)
Creates a new empty hashtable with the given initial capacity. |
|
| Method Summary | |
void |
clear()
Clears this hashtable so that it contains no entries. |
java.lang.Object |
get(java.lang.Object key)
Returns the value object to which the specified key obejct is mapped. |
boolean |
iterHasMore()
Returns true if the iteration has more elements. |
void |
iterInit()
Initializes the iteration for this hashtable. |
java.lang.Object |
iterNext()
Returns the next element in the iteration. |
int |
put(java.lang.Object key,
java.lang.Object value)
Maps the specified key object to the specified
value object. |
int |
remove(java.lang.Object key)
Removes the key object (and corresponding value object) from the hashtable. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TinyHash(int i)
i - the initial capacity of the hashtable.| Method Detail |
public java.lang.Object get(java.lang.Object key)
key - a key object in the hashtable.
null if the key is found or the key is null.
public int put(java.lang.Object key,
java.lang.Object value)
key object to the specified
value object.
key - the key object.value - the value object.
-1 if the value object or key object is
null and 0 otherwise.public int remove(java.lang.Object key)
key - the key object to be removed.
public void clear()
public void iterInit()
public boolean iterHasMore()
public java.lang.Object iterNext()
|
TinyLine v2.0 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||