|
net.datastructures - version 5.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Map<K,V>
An interface for a map which binds a key uniquely to a value.
Method Summary | |
---|---|
Iterable<Entry<K,V>> |
entrySet()
Returns an iterable object containing all the entries in the map. |
V |
get(K key)
Returns the value of the entry containing the given key. |
boolean |
isEmpty()
Returns whether the map is empty. |
Iterable<K> |
keySet()
Returns an iterable object containing all the keys in the map. |
V |
put(K key,
V value)
If there is an entry with the specified key, replaces the value of this entry with the specified value and returns the old value. |
V |
remove(K key)
If there is an entry with the specified key, removes this entry and returns its value. |
int |
size()
Returns the number of items in the map. |
Iterable<V> |
values()
Returns an iterable object containing all the values in the map. |
Method Detail |
---|
int size()
boolean isEmpty()
V put(K key, V value) throws InvalidKeyException
InvalidKeyException
V get(K key) throws InvalidKeyException
InvalidKeyException
V remove(K key) throws InvalidKeyException
InvalidKeyException
Iterable<K> keySet()
Iterable<V> values()
Iterable<Entry<K,V>> entrySet()
|
net.datastructures - version 5.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |