|
net.datastructures - version 4.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>> |
entries()
Returns an iterable object containing all the entries in the map. |
V |
get(K key)
Returns the value associated with a key. |
boolean |
isEmpty()
Returns whether the map is empty. |
Iterable<K> |
keys()
Returns an iterable object containing all the keys in the map. |
V |
put(K key,
V value)
Puts a given key-value pair in the map, replacing a previous one, if any, and returns the old value. |
V |
remove(K key)
Removes the key-value pair with a given key. |
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> keys()
Iterable<V> values()
Iterable<Entry<K,V>> entries()
|
net.datastructures - version 4.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |