All Packages Class Hierarchy This Package Previous Next Index
Interface jdsl.core.api.Position
- public interface Position
Interface for a position. A position formalizes the intuitive
notion of the "place" where an element is stored in a positional
container (sequence, tree, graph). A node of a tree and a vertex
of a graph are examples of positions.
- See Also:
- PositionalContainer, InvalidPositionException
-
container()
-
Return the container holding this position.
-
element()
-
Return the element stored at this position.
element
public abstract Object element() throws InvalidPositionException
- Return the element stored at this position.
An InvalidPositionException is thrown if the position is
invalid because it was removed from its container.
- Returns:
- element stored at this position
container
public abstract Container container() throws InvalidPositionException
- Return the container holding this position.
An InvalidPositionException is thrown if the position is
invalid because it was removed from its container.
- Returns:
- container holding this position.
All Packages Class Hierarchy This Package Previous Next Index