edu.ksu.cis.projects.bogor.module.value
Class ValueVisitor

java.lang.Object
  extended by edu.ksu.cis.projects.bogor.module.value.ValueVisitor
All Implemented Interfaces:
Disposable

public final class ValueVisitor
extends Object
implements Disposable

A visitor pattern for values.

Version:
CVS $Revision: 1.4 $ $Date: 2005/06/07 02:34:45 $
Author:
Robby

Constructor Summary
ValueVisitor(IValueVisitorAction vea, boolean depthFirst, boolean visitRecordLock)
          Default constructor.
 
Method Summary
 void dispose()
          Remove references.
 HashSet<IValue> getSeenSet()
          Gets the seen set of this visitor.
 LinkedList<IValue> getWorkList()
          Gets the work list of this visitor.
 void setValueComparator(IValueComparator vc)
           
 void visit(IValue value)
          Visits values reachable from a particular value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValueVisitor

public ValueVisitor(IValueVisitorAction vea,
                    boolean depthFirst,
                    boolean visitRecordLock)
Default constructor.

Parameters:
vea - The value visitor action for this value visitor. Must be non-null.
depthFirst - Indicates whether a DFS (if true) or BFS (otherwise).
visitRecordLock - Indicates whether record locks should be visited.
Method Detail

getSeenSet

public HashSet<IValue> getSeenSet()
Gets the seen set of this visitor.

Returns:
The seen set of this visitor. Non-null.

setValueComparator

public void setValueComparator(IValueComparator vc)

getWorkList

public LinkedList<IValue> getWorkList()
Gets the work list of this visitor.

Returns:
The work list of this visitor. Non-null.

dispose

public void dispose()
Description copied from interface: Disposable
Remove references. Once called, avoid using this object.

Specified by:
dispose in interface Disposable
See Also:
Disposable.dispose()

visit

public void visit(IValue value)
Visits values reachable from a particular value.

Parameters:
value - The root value to start visiting from. Must be non-null.