The Octet Molecular Representation Framework v0.8.2

net.sf.octet.traversal
Class PrintingHandler

java.lang.Object
  extended bynet.sf.octet.traversal.PrintingHandler
All Implemented Interfaces:
TraversalHandler

public class PrintingHandler
extends java.lang.Object
implements TraversalHandler

A convenience implementation of the TraversalHandler interface that prints a message to a client specified OutputStream in response to each traversal event. PrintingHandler can be used when developing new traversals or in debugging existing traversals.

Author:
Richard Apodaca

Constructor Summary
PrintingHandler(java.io.PrintStream out)
          Constructs a fully functional PrintingHandler.
 
Method Summary
 boolean abortTraversal()
          Implement this method to enable a traversal algorithm to be aborted.
 void atomPairTraversed(AtomPair pair)
          Implement this method to be notified that traversal of pair has just been completed.
 void atomTraversed(Atom atom)
          Implement this method to be notified that traversal of atom has just been completed.
 void traversalFinished(AtomGraph graph)
          Implement this method to be notified that traversal of graph is finished.
 void traversalStarted(AtomGraph graph)
          Implement this method to be notified that traversal of graph has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintingHandler

public PrintingHandler(java.io.PrintStream out)
Constructs a fully functional PrintingHandler.

Method Detail

traversalStarted

public void traversalStarted(AtomGraph graph)
Description copied from interface: TraversalHandler
Implement this method to be notified that traversal of graph has started.

Specified by:
traversalStarted in interface TraversalHandler
Parameters:
graph - the AtomGraph that will be traversed

traversalFinished

public void traversalFinished(AtomGraph graph)
Description copied from interface: TraversalHandler
Implement this method to be notified that traversal of graph is finished.

Specified by:
traversalFinished in interface TraversalHandler
Parameters:
graph - the AtomGraph whose traversal was completed

abortTraversal

public boolean abortTraversal()
Description copied from interface: TraversalHandler
Implement this method to enable a traversal algorithm to be aborted.

Specified by:
abortTraversal in interface TraversalHandler
Returns:
true if traversal should be aborted, or false otherwise

atomPairTraversed

public void atomPairTraversed(AtomPair pair)
Description copied from interface: TraversalHandler
Implement this method to be notified that traversal of pair has just been completed.

Specified by:
atomPairTraversed in interface TraversalHandler
Parameters:
pair - the AtomPair that was just traversed

atomTraversed

public void atomTraversed(Atom atom)
Description copied from interface: TraversalHandler
Implement this method to be notified that traversal of atom has just been completed.

Specified by:
atomTraversed in interface TraversalHandler
Parameters:
atom - the Atom that was just traversed

The Octet Molecular Representation Framework v0.8.2