jdsl.core.api
Interface Dictionary

All Superinterfaces:
Container, InspectableContainer, InspectableDictionary, InspectableKeyBasedContainer, KeyBasedContainer
All Known Subinterfaces:
OrderedDictionary
All Known Implementing Classes:
HashtableDictionary, RedBlackTree

public interface Dictionary
extends InspectableDictionary, KeyBasedContainer

A container that accepts (key,element) pairs and allows later lookup of the element associated with a particular key. The interface allows users to perform lookup operations on the container, but the container is not necessarily ordered. That is, the user cannot rely on the ordering of the container (for example, returned in the form of an Iterator), which depends on particulars that he/she has to ignore (such as implementation details, history of the methods calls, randomization).

Version:
JDSL 2.1.1
Author:
Mark Handy, Luca Vismara, Andrew Schwerin
See Also:
OrderedDictionary

Nested Class Summary
 
Nested classes inherited from class jdsl.core.api.InspectableDictionary
InspectableDictionary.InvalidLocator
 
Field Summary
 
Fields inherited from interface jdsl.core.api.InspectableDictionary
NO_SUCH_KEY
 
Method Summary
 LocatorIterator removeAll(Object key)
          Removes all the (key,element) pairs matching the parameter key.
 
Methods inherited from interface jdsl.core.api.InspectableDictionary
find, findAll
 
Methods inherited from interface jdsl.core.api.InspectableKeyBasedContainer
keys, locators
 
Methods inherited from interface jdsl.core.api.InspectableContainer
contains, elements, isEmpty, size
 
Methods inherited from interface jdsl.core.api.KeyBasedContainer
insert, remove, replaceKey
 
Methods inherited from interface jdsl.core.api.Container
newContainer, replaceElement
 

Method Detail

removeAll

public LocatorIterator removeAll(Object key)
                          throws InvalidKeyException
Removes all the (key,element) pairs matching the parameter key.

Parameters:
key - the key to search for
Returns:
a LocatorIterator over the (key, element) pairs whose keys match the parameter key
Throws:
InvalidKeyException - if the specified key is not a valid key in this container