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.

See Also:
PositionalContainer, KeyBasedContainer, Container

Method Index

 o elements()
Returns an enumeration of the elements stored in the container.
 o newContainer()
Instantiates another container of the same class (without knowing the class).

Methods

 o 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
 o 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