|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Dictionary<K,V>
An interface for a dictionary storing (key-value) pairs.
| Method Summary | |
|---|---|
java.lang.Iterable<Entry<K,V>> |
entries()
Returns an iterator containing all the entries in the dictionary. |
Entry<K,V> |
find(K key)
Returns an entry containing the given key, or null if no such entry exists. |
java.lang.Iterable<Entry<K,V>> |
findAll(K key)
Returns an iterator containing all the entries containing the given key, or an empty iterator if no such entries exist. |
Entry<K,V> |
insert(K key,
V value)
Inserts an item into the dictionary. |
boolean |
isEmpty()
Returns whether the dictionary is empty. |
Entry<K,V> |
remove(Entry<K,V> e)
Removes and returns the given entry from the dictionary. |
int |
size()
Returns the number of entries in the dictionary. |
| Method Detail |
|---|
int size()
boolean isEmpty()
Entry<K,V> find(K key)
throws InvalidKeyException
InvalidKeyException
java.lang.Iterable<Entry<K,V>> findAll(K key)
throws InvalidKeyException
InvalidKeyException
Entry<K,V> insert(K key,
V value)
throws InvalidKeyException
InvalidKeyException
Entry<K,V> remove(Entry<K,V> e)
throws InvalidEntryException
InvalidEntryExceptionjava.lang.Iterable<Entry<K,V>> entries()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||