|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This interface is intended to parallel the JDK 1.2 Map interface. A Map is much like a hash table in which it stores key/value pairs. Please see the JDK 1.2 documenation for further details.
| Nested Class Summary | |
static interface |
Map.Entry
An interface representing entries in a map. |
| Method Summary | |
void |
clear()
Removes all mappings stored in this map (optional operation). |
boolean |
containsKey(java.lang.Object key)
Returns true if the specified key is contained in this map. |
boolean |
containsValue(java.lang.Object value)
Returns true if the specified value is contained in this map. |
Set |
entrySet()
Returns a set representation of the map entries in this set. |
boolean |
equals(java.lang.Object o)
Returns true of the specified object equals this map. |
java.lang.Object |
get(java.lang.Object key)
Returns the value for the specified key from the map. |
int |
hashCode()
Returns a hash code for this map. |
boolean |
isEmpty()
Return true if the map is empty. |
Set |
keySet()
Returns a set representation of all the keys in this map. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Asscociates the specified value with the specified key (option operation). |
void |
putAll(Map map)
Copies all of the mapping from the specified map in to this map (optional operation). |
java.lang.Object |
remove(java.lang.Object key)
Removes the key from this map (optional operation). |
int |
size()
Return the number of entries in this map. |
Collection |
values()
Returns a collection of all the values contained in this map. |
| Method Detail |
public int size()
public boolean isEmpty()
public boolean containsKey(java.lang.Object key)
key - the key being checked for in this map.
public boolean containsValue(java.lang.Object value)
value - the value being checked for in this map
public java.lang.Object get(java.lang.Object key)
key - the key used for lookup in this map.
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
key - the key with which the value is associatedvalue - the value associated with the key
public java.lang.Object remove(java.lang.Object key)
key - the key to be removed
public void putAll(Map map)
map - the mappings to be stored in this mappublic void clear()
public Set keySet()
public Collection values()
public Set entrySet()
Map.Entry,
public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to be compared to
public int hashCode()
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||