Interface PositionalContainer

All Superinterfaces:
Container, InspectableContainer, InspectablePositionalContainer
All Known Subinterfaces:
BinaryTree, CircularSequence, EmbeddedPlanarGraph, Graph, ModifiableGraph, OrderedGraph, Sequence, Tree
All Known Implementing Classes:

public interface PositionalContainer
extends InspectablePositionalContainer, Container

Positional containers (for example, sequences, trees, and graphs) are containers in which elements are related to each other through adjacency information.

A positional container stores elements at its positions and defines adjacency relationships between the positions (for example, before/after in a sequence, parent/child in a tree). Thus, the model of storage is topological -- i.e., a positional container is a graph, or some restricted version of a graph. This means that the position at which an element is stored is decided by the user and is arbitrary from the point of view of the container.

$Id: PositionalContainer.java,v 1.6 2000/01/12 03:21:33 mdh Exp $
Mark Handy, Michael T. Goodrich, Roberto Tamassia, Mike Boilen (mgb), Andrew Schwerin (schwerin)
See Also:
Position, Container

Method Summary
 void swapElements(Position a, Position b)
          Swaps the elements associated with the two positions, leaving the positions themselves "where" they were.
Methods inherited from interface jdsl.core.api.InspectablePositionalContainer
Methods inherited from interface jdsl.core.api.InspectableContainer
contains, elements, isEmpty, size
Methods inherited from interface jdsl.core.api.Container
newContainer, replaceElement

Method Detail


public void swapElements(Position a,
                         Position b)
                  throws InvalidAccessorException
Swaps the elements associated with the two positions, leaving the positions themselves "where" they were.
a - First Position to swap
b - Second Position to swap
InvalidAccessorException - if either of a and b is null or does not belong to this positional container