|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
PositionalContainer
Methods inherited from interface jdsl.core.api.Accessor |
element |
Methods inherited from interface jdsl.core.api.Decorable |
attributes, destroy, get, has, set |
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |