JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.datasource
Class TreeIterator

java.lang.Object
  |
  +--com.klg.jclass.datasource.TreeIterator
All Implemented Interfaces:
Serializable, TreeIteratorModel
Direct Known Subclasses:
ForwardTreeIterator, ReverseTreeIterator

public class TreeIterator
extends Object
implements TreeIteratorModel

Iterates over the siblings of a tree; extends TreeIteratorModel.

See Also:
Serialized Form

Field Summary
protected  Vector children
           
protected  int currentNode
           
protected  int firstNode
           
 
Fields inherited from interface com.klg.jclass.datasource.TreeIteratorModel
serialVersionUID
 
Constructor Summary
TreeIterator(com.klg.jclass.datasource.DataSourceTreeNode startNode)
           
 
Method Summary
 void advance()
          Move to the next element in this iterator's list.
 void advance(int offset)
          Move ahead a specified number of elements in this iterator's list.
 boolean atBegin()
          Returns boolean: true if iterator is positioned at the beginning of list, false otherwise.
 boolean atEnd()
          Returns boolean: true if iterator is positioned at the end of list, false otherwise.
 Object clone()
          Return a copy of the current node.*
 Object get()
          Return the current node.
 boolean hasMoreElements()
          Returns boolean: true if this node has more children, false otherwise.
 Object nextElement()
          Return the next child of this node.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

firstNode

protected int firstNode

currentNode

protected int currentNode

children

protected Vector children
Constructor Detail

TreeIterator

public TreeIterator(com.klg.jclass.datasource.DataSourceTreeNode startNode)
Method Detail

nextElement

public Object nextElement()
Description copied from interface: TreeIteratorModel
Return the next child of this node.

Specified by:
nextElement in interface TreeIteratorModel
Returns:
the Object which is the next child of this node

hasMoreElements

public boolean hasMoreElements()
Description copied from interface: TreeIteratorModel
Returns boolean: true if this node has more children, false otherwise.

Specified by:
hasMoreElements in interface TreeIteratorModel
Returns:
boolean: true if there are more children, false otherwise

atBegin

public boolean atBegin()
Description copied from interface: TreeIteratorModel
Returns boolean: true if iterator is positioned at the beginning of list, false otherwise.

Specified by:
atBegin in interface TreeIteratorModel
Returns:
boolean: true if positioned at start of list, false otherwise

get

public Object get()
Description copied from interface: TreeIteratorModel
Return the current node.

Specified by:
get in interface TreeIteratorModel
Returns:
the Object on which the iterator is currently positioned

advance

public void advance(int offset)
Description copied from interface: TreeIteratorModel
Move ahead a specified number of elements in this iterator's list.

Specified by:
advance in interface TreeIteratorModel

clone

public Object clone()
Description copied from interface: TreeIteratorModel
Return a copy of the current node.*

Specified by:
clone in interface TreeIteratorModel
Overrides:
clone in class Object
Returns:
an Object which is a copy of the current node

atEnd

public boolean atEnd()
Description copied from interface: TreeIteratorModel
Returns boolean: true if iterator is positioned at the end of list, false otherwise.

Specified by:
atEnd in interface TreeIteratorModel
Returns:
boolean: true if positioned at end of list, false otherwise

advance

public void advance()
Description copied from interface: TreeIteratorModel
Move to the next element in this iterator's list.

Specified by:
advance in interface TreeIteratorModel

Copyright © 2004 Quest Software Inc..
All rights reserved.