All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class aioli.vtp.TopDownTreeWalk

java.lang.Object
   |
   +----aioli.vtp.TopDownTreeWalk

public class TopDownTreeWalk
extends Object
implements Iterator
A class that implements a TopDownTreeWalk Example of use of the Iterator:
    Tree tree;
    ...
    for ( TopDownTreeWalk i = tree.beginTopDown(); !i.atEnd(); i.advance() )
      if ((Tree)i.get().arity().atomp())
        System.out.println((Tree)i.get().operator_name()+" "+(Tree)i.get().atom_value());
      else
        System.out.println((Tree)i.get().operator_name());


Method Index

 o advance()
Advances to the next tree.
 o advance(int)
Advances by n.
 o atEnd()
Returns true if I'm positioned after the last item.
 o clone()
Return a copy of the iterator with the current position.
 o get()
Returns The object at the current position.
 o isLastElement()
Not implemented, returns false.
 o setPosition(int)
Sets the new position at n.

Methods

 o clone
 public Object clone()
Return a copy of the iterator with the current position.

Overrides:
clone in class Object
 o get
 public Object get()
Returns The object at the current position.

 o atEnd
 public boolean atEnd()
Returns true if I'm positioned after the last item.

 o isLastElement
 public boolean isLastElement()
Not implemented, returns false.

 o advance
 public void advance()
Advances to the next tree.

 o advance
 public void advance(int n)
Advances by n. Not implemented.

Parameters:
n - The increment of the new position.
 o setPosition
 public void setPosition(int n)
Sets the new position at n. Not implemented. does nothing if the new position is out of bound.

Parameters:
n - The new position of the Iterator.

All Packages  Class Hierarchy  This Package  Previous  Next  Index