jdsl.core.api
Interface Position
- All Superinterfaces:
- Accessor, Decorable
- All Known Subinterfaces:
- Edge, Face, Vertex
- All Known Implementing Classes:
- NodeBinaryTree.NBTNode, NodeSequence.FNSNode
- public interface Position
- extends Accessor, Decorable
An abstraction of the notion of a "place" in a
container -- where an element is stored relative to other elements in
the container. (A node of a tree and a vertex of a graph are examples of
positions.) Conceptually, what Position adds to Accessor's ability to
get an element is the ability to get such topological information; but
the nature of the topological information varies with the container,
so there are no new methods here.
When a
position is no longer used by the container it is marked as
invalid and any subsequent use of that position provokes an
InvalidAccessorException
. An InvalidAccessorException
is also thrown when a Position belongs to a different container
(either a container of a different type, or another container of this
same type).
Two possible implementations of a position: as a
wrapper around an index into an array, or as a reference to a node.
- Version:
- $Id: Position.java,v 1.3 2000/01/12 03:21:33 mdh Exp $
- Author:
- Mark Handy (mdh), Benoit Hudson (bh), Andrew Schwerin (schwerin), Michael T. Goodrich, Roberto Tamassia
- See Also:
PositionalContainer