|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
A Map is a collection that maps a key to a value. A Hashtable is an instance of a Map.
| Nested Class Summary | |
static interface |
Map.MapEntry
|
| Method Summary | |
void |
clear()
Remove all entries in the Map. |
boolean |
containsKey(Object key)
Checks if an entry with the specified key is in the Map. |
boolean |
containsValue(Object value)
Checks if at least one entry with the specified value is in the Map. |
Iterator |
entries()
Provides an Iterator to iterate through all the entries. |
Object |
get(Object key)
Get the object with the specified key. |
Object |
put(Object key,
Object value)
Put the object and key in the Map. |
Object |
remove(Object key)
Remove the object and key pair from the Map. |
int |
size()
Get the number of entries in the Map. |
| Method Detail |
public Iterator entries()
public int size()
public void clear()
public boolean containsKey(Object key)
key - The key to look for.
public boolean containsValue(Object value)
value - The value to look for.
public Object get(Object key)
key - The key to look for.
public Object put(Object key,
Object value)
key - The key for the object.value - The object to put
public Object remove(Object key)
key - The key for the Object to replace.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||