jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.LinkedTreeIterator
Variables Constructors Properties Methods
Implements Serializable, Enumeration
The LinkedTreeIterator
class iterates over the siblings of a linked tree. It reads and writes one tree node at a time in a forward direction. It requires a linked tree.
protected LinkedTreeNode firstSiblingThe first node where iteration begins in the tree.
protected LinkedTreeNode siblingA node in the tree.
public LinkedTreeIterator(LinkedTreeNode firstSibling)Constructs a
LinkedTreeIterator
object pointed at the specified node.
Parameters:
firstSibling
public void advance()Advances to the next node in the
LinkedTreeIterator
.
public void advance(int offset)Advances to the specified node in the
LinkedTreeIterator
.
public boolean atBegin()Returns true if the location is at the beginning of the
LinkedTreeIterator
.
public boolean atEnd()Returns true if the location is at the end of the
LinkedTreeIterator
.
public Object clone()Clones this
LinkedTreeIterator
object.
Overrides: java.lang.Object.clone()
public int distance(LinkedTreeIterator that)
public boolean equals(LinkedTreeIterator that)Determines whether the specified
LinkedTreeIterator
is equal to this one.
public Object get()Gets an
Object
in the LinkedTreeIterator
.
public Object get(int offset)Returns the
Object
at the specified offset.
public void put(int offset, Object object)Puts the specified
Object
into the LinkedTreeIterator
at the specified offset.
public void put(Object data)Puts the specified data
Object
into the LinkedTreeIterator
.