|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An simple map interface. A map is an unordered collection that associates keys with values. The keys in the table must form a set, that is, there may not be duplicates. Multiple keys may map to the same value, however. Finally, null is neither a valid key nor value.
Method Summary | |
void |
clear()
Remove all associations from the map. |
boolean |
containsKey(java.lang.Object key)
Answer true iff the given key exists in the map. |
boolean |
containsValue(java.lang.Object value)
Answer true iff the given value exists in the map. |
java.lang.Object |
get(java.lang.Object key)
Answer the value associated with the given key. |
boolean |
isEmpty()
Answer (size() == 0) |
SimpleIterator |
keys()
Answer a SimpleIterator over the keys in the association. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Associate the given key and value, replacing any previous association for the given key. |
java.lang.Object |
remove(java.lang.Object key)
Remove the association (if any) for the given key. |
int |
size()
Answer the number of associations in the map. |
SimpleIterator |
values()
Answer a SimpleIterator over the values in the association. |
Method Detail |
public void clear()
public boolean containsKey(java.lang.Object key)
public boolean containsValue(java.lang.Object value)
public java.lang.Object get(java.lang.Object key)
public boolean isEmpty()
public SimpleIterator keys()
public java.lang.Object put(java.lang.Object key, java.lang.Object value)
public java.lang.Object remove(java.lang.Object key)
public int size()
public SimpleIterator values()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |