All Packages Class Hierarchy This Package Previous Next Index
KeyBasedContainers may be viewed abstractly as storing pairs of the type, p(k,e) where
public abstract void insert(Locator locator) throws InvalidKeyException, InvalidLocatorException, ContainedLocatorException
locator is not a type accepted by
this Container. (For instance, if the container's Comparator
can't compare the element, or if the container should have
a comparator but doesn't.)
locator
cannot be inserted into this container.
public abstract Locator insert(Object key,
Object element) throws InvalidKeyException
key is an explicit key. That is, it is mapped to
element and used to position element within
this Container.
element
within this Container.
key
is not a type accepted by this Container. (For instance, if
the container's Comparator
can't compare the element, or if the container should have
a comparator but doesn't.)
public abstract void remove(Locator locator) throws InvalidLocatorException, UncontainedLocatorException
locator is
invalid.
locator
is not in a container.
public abstract Object replaceKey(Locator locator,
Object key) throws InvalidLocatorException, InvalidKeyException
locator's element will now be mapped to
key. The original key this element was mapped to is returned
Note: this method does not necessarily remove the old key (other
elements within this Container may be mapped to it).
locator's
element should be mapped.
locator's element
was mapped.
locator is
invalid (For example: It does not actually reference
an element in this Container).
key
is not a type accepted by this Container (e.g. If
this Container is unable to use key
as a key).
public abstract Object replaceElement(Locator loc,
Object newElement) throws InvalidLocatorException
public abstract Enumeration locators()
public abstract Enumeration keys()
public abstract Locator makeLocator(Object key,
Object element) throws InvalidKeyException
All Packages Class Hierarchy This Package Previous Next Index