org.modeshape.graph.session
Class GraphSession.NodeVisitor<NodePayload,PropertyPayloadType>

java.lang.Object
  extended by org.modeshape.graph.session.GraphSession.NodeVisitor<NodePayload,PropertyPayloadType>
Type Parameters:
NodePayload - the type of node payload object
PropertyPayloadType - the type of property payload object
Direct Known Subclasses:
GraphSession.LoadNodesVisitor
Enclosing class:
GraphSession<Payload,PropertyPayload>

@NotThreadSafe
public abstract static class GraphSession.NodeVisitor<NodePayload,PropertyPayloadType>
extends Object

The node visitor.


Constructor Summary
GraphSession.NodeVisitor()
           
 
Method Summary
 void finish()
          Method that should be called after all visiting has been done successfully (with no exceptions), including when no nodes were visited.
abstract  boolean visit(GraphSession.Node<NodePayload,PropertyPayloadType> node)
          Visit the supplied node, returning whether the children should be visited.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphSession.NodeVisitor

public GraphSession.NodeVisitor()
Method Detail

visit

public abstract boolean visit(GraphSession.Node<NodePayload,PropertyPayloadType> node)
Visit the supplied node, returning whether the children should be visited.

Parameters:
node - the node to be visited; never null
Returns:
true if the node's children should be visited, or false if no children should be visited

finish

public void finish()
Method that should be called after all visiting has been done successfully (with no exceptions), including when no nodes were visited.



Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.