All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface jdsl.core.api.Dictionary

public interface Dictionary
extends KeyBasedContainer
A KeyBasedContainer which provides element lookup based upon search keys.


Variable Index

 o NO_SUCH_KEY
Locator returned by find(.) when the key requested is not present in the Dictionary.

Method Index

 o find(Object)
Returns a Locator mapped to the search key.
 o findAll(Object)
Returns an Enumeration of Locators mapped to the search key.

Variables

 o NO_SUCH_KEY
 public static final Locator NO_SUCH_KEY
Locator returned by find(.) when the key requested is not present in the Dictionary. Note that dictionaries have special values returned from lookup methods, rather than exceptions, when the lookup fails.

Methods

 o find
 public abstract Locator find(Object key) throws InvalidKeyException
Returns a Locator mapped to the search key. There is no guarantee that the mapping of this Locator to key is unique-- there may be many Locators mapped to the same key depending on the particular implementation of this Dictionary. Furthermore, there may be no such element mapped to key in which case the Locator returned will be NO_SUCH_KEY, which is invalid. That is, it does not reference an element in any Container and cannot be used.

Parameters:
key - The key used to search for an element in this Container.
Returns:
A Locator mapped to key. Note: this Locator will be NO_SUCH_KEY, an invalid locator, if the key is not found.
Throws: InvalidKeyException
If key is not of a type accepted by this Container (For example: The key is not comparable by this Container).
 o findAll
 public abstract Enumeration findAll(Object key) throws InvalidKeyException
Returns an Enumeration of Locators mapped to the search key. This method is guaranteed to return all elements associated with key. If there are no such elements then the Enumeration is empty. There is no guaranteed of order of these Locators.

Parameters:
key - The key used to search for an element within this Container.
Returns:
An Enumeration of Locators mapped to key . Note: the Enumeration will be empty if no such elements exist in the container.
Throws: InvalidKeyException
If key is not of a type accepted by this Container (For example: The key is not comparable by this Container).

All Packages  Class Hierarchy  This Package  Previous  Next  Index