|
datastructures | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An interface for a map which binds a key uniquely to a value.
Method Summary | |
Object |
get(Object key)
Returns the value associated with a key. |
boolean |
isEmpty()
Returns whether the map is empty. |
Iterator |
keys()
Returns an iterator of all keys in the map. |
Object |
put(Object key,
Object value)
Put a key-value pair in the map, replacing previous one if it exists. |
Object |
remove(Object key)
Removes the key-value pair with a specified key. |
int |
size()
Returns the number of items in the map. |
Iterator |
values()
Returns an iterator of all values in the map. |
Method Detail |
public int size()
public boolean isEmpty()
public Object put(Object key, Object value) throws InvalidKeyException
InvalidKeyException
public Object get(Object key) throws InvalidKeyException
InvalidKeyException
public Object remove(Object key) throws InvalidKeyException
InvalidKeyException
public Iterator keys()
public Iterator values()
|
datastructures | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |