|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Dictionary<K,V>
Interface representing a set of key/value pairs.
Nested Class Summary | |
---|---|
static class |
Dictionary.Pair<K,V>
Class representing a key/value pair. |
Method Summary | |
---|---|
boolean |
containsKey(K key)
Tests the existence of a key in the dictionary. |
V |
get(K key)
Retrieves the value for the given key. |
V |
put(K key,
V value)
Sets the value of the given key, creating a new entry or replacing the existing value. |
V |
remove(K key)
Removes a key/value pair from the map. |
Method Detail |
---|
V get(K key)
key
- The key whose value is to be returned.
V put(K key, V value)
key
- The key whose value is to be set.value
- The value to be associated with the given key.
V remove(K key)
key
- The key whose mapping is to be removed.
boolean containsKey(K key)
key
- The key whose presence in the dictionary is to be tested.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |