nz.ac.waikato.jdsl.core.api
Interface Position
- All Superinterfaces:
- Accessor, Decorable
- All Known Subinterfaces:
- Edge, Vertex
- All Known Implementing Classes:
- Edge.NONEEdge, NodeBinaryTree.NBTNode, NodeBinaryTree.NBTSuperNode, NodeSequence.FNSNode, Vertex.NONEVertex
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:
- JDSL 2.1.1
- Author:
- Mark Handy (mdh), Benoit Hudson (bh), Andrew Schwerin (schwerin), Michael T. Goodrich, Roberto Tamassia
- See Also:
PositionalContainer
Methods inherited from interface nz.ac.waikato.jdsl.core.api.Accessor |
element |
Copyright © 2009 ModelJUnit Project. All Rights Reserved.