nz.ac.waikato.jdsl.core.api
Interface Accessor

All Known Subinterfaces:
Edge, Locator, Position, Vertex
All Known Implementing Classes:
Edge.NONEEdge, InspectableDictionary.InvalidLocator, NodeBinaryTree.NBTNode, NodeBinaryTree.NBTSuperNode, NodeSequence.FNSNode, Vertex.NONEVertex

public interface Accessor

All JDSL core containers provide a way to access their internal structure; Accessor is the interface that embodies this concept. Containers guarantee not to change the binding between an Accessor and its element, unless the user explicitly requests a change (PositionalContainer.swap(.) and various *Container.replace*(.) are the only methods that change the binding).

An Accessor provides only the minimal guarantee of being able to retrieve an element. All container interfaces are actually written in terms of the two subinterfaces of Accessor: Position and Locator. PositionalContainers use Positions, and they add topological information (i.e., adjacency information) to the element-binding provided by Accessor. KeyBasedContainers use Locators, and they add a key to Accessor's element.

Version:
JDSL 2.1.1
Author:
Mark Handy (mdh), Luca Vismara (lv)
See Also:
Position, Locator

Method Summary
 java.lang.Object element()
          Gets the element currently associated with this accessor.
 

Method Detail

element

java.lang.Object element()
Gets the element currently associated with this accessor.

Returns:
the element currently stored at this accessor


Copyright © 2009 ModelJUnit Project. All Rights Reserved.