All Packages Class Hierarchy This Package Previous Next Index
Interface jdsl.core.api.Container
- public interface Container
- extends Container
A container is a collection of elements, each of which is a generic
Object. An element can be stored multiple times in a container.
This is the base interface for all the container interfaces in
the "core" package (e.g., Sequence,
PriorityQueue),
by way of the subinterfaces
PositionalContainer
and KeyBasedContainer.
- Version:
- $Revision: 1.2 $, $Date: 1998/06/29 21:10:45 $
- Author:
- Michael T. Goodrich, Mark Handy, Roberto Tamassia
- See Also:
- PositionalContainer, KeyBasedContainer, Container
-
elements()
- Returns an enumeration of the elements stored in the container.
-
newContainer()
- Instantiates another container of the same class (without knowing
the class).
elements
public abstract Enumeration elements()
- Returns an enumeration of the elements stored in the container.
Duplicated elements appear in the enumeration as many times as they
are held in the container. For some containers, the order of
the elements in the enumeration is arbitrary, but for some it is
defined.
- Returns:
- Enumeration of all elements in the container
newContainer
public abstract Container newContainer() throws InvalidContainerException
- Instantiates another container of the same class (without knowing
the class).
- Returns:
- a new instance of the class of the container on which the
method is called
All Packages Class Hierarchy This Package Previous Next Index