brs.visitor
Class InOrderPrint<T>
java.lang.Object
   brs.visitor.InOrderPrint<T>
brs.visitor.InOrderPrint<T>
- All Implemented Interfaces: 
- IVisitor<T,java.lang.Void,java.lang.Void>
- public class InOrderPrint<T> 
- extends java.lang.Object- implements IVisitor<T,java.lang.Void,java.lang.Void>
Print all the numbers in a tree in in-order, line by line
 
| Method Summary | 
|  java.lang.Void | emptyCase(BiTree<T> host,
                   java.lang.Void... nu)Called by the host when the host is empty.
 | 
| static void | main(java.lang.String[] args)
 | 
|  java.lang.Void | nonEmptyCase(BiTree<T> host,
                         java.lang.Void... nu)Called by the host when the host is not empty.
 | 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
InOrderPrint
public InOrderPrint()
emptyCase
public java.lang.Void emptyCase(BiTree<T> host,
                                java.lang.Void... nu)
- Description copied from interface: IVisitor
- Called by the host when the host is empty.
 
- 
- Specified by:
- emptyCasein interface- IVisitor<T,java.lang.Void,java.lang.Void>
 
- 
- Parameters:
- host- an empty BiTree on which this IVisitor operates.
- nu- the vararg input needed by this IVisitor to perform its task.
- Returns:
- Object the output of this algorithm on the host.
 
nonEmptyCase
public java.lang.Void nonEmptyCase(BiTree<T> host,
                                   java.lang.Void... nu)
- Description copied from interface: IVisitor
- Called by the host when the host is not empty.
 
- 
- Specified by:
- nonEmptyCasein interface- IVisitor<T,java.lang.Void,java.lang.Void>
 
- 
- Parameters:
- host- a non-empty BiTree on which this IVisitor operates.
- nu- the vararg input needed by this IVisitor to perform its task.
- Returns:
- Object the output of this algorithm on the host.
 
main
public static void main(java.lang.String[] args)
- 
 
-