java.lang.Object
de.grogra.graph.VisitorImpl
de.grogra.pointcloud.utils.Visitors.GetFirstLeafVisitor
- All Implemented Interfaces:
Visitor
- Enclosing class:
Visitors
-
Field Summary
FieldsFields inherited from class de.grogra.graph.VisitorImpl
pattern, state -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvisitEnter(Path path, boolean node) Informs this visitor about a node or edge in the graph.Informs this visitor about the beginning of an instantiation.Methods inherited from class de.grogra.graph.VisitorImpl
getGraphState, init, visitInstanceLeave, visitLeave
-
Field Details
-
first
-
-
Constructor Details
-
GetFirstLeafVisitor
public GetFirstLeafVisitor()
-
-
Method Details
-
visitEnter
Description copied from interface:VisitorInforms this visitor about a node or edge in the graph.pathcontains the path from the root up to and including the node or, in case an edge is visited, the edge and its terminal node. Later on,Visitor.visitLeave(java.lang.Object, de.grogra.graph.Path, boolean)will be invoked with the returned value of this invocation,pathandnodeas arguments. If this method returnsVisitor.STOP, the correspondingvisitLeave-method will be invoked immediately after this method, i.e., the visitor does not dive more deeply in the hierarchy. Otherwise, if a node is visited and there are instantiations associated with or edges connected with it (regardless of their direction), their corresponding visitor methods will be invoked inbetween. Likewise, if an edge is visited, its indicent terminal node will be visited next.- Specified by:
visitEnterin interfaceVisitor- Overrides:
visitEnterin classVisitorImpl- Parameters:
path- current pathnode- do we enter a node or an edge?- Returns:
- value to pass to
visitLeave, may beVisitor.STOP
-
visitInstanceEnter
Description copied from interface:VisitorInforms this visitor about the beginning of an instantiation. This method invokation is nested immediately withinvisitEnter/visitLeaveof a node. Later on,Visitor.visitInstanceLeave(Object)will be invoked with the returned value of this invocation as argument. If this method returnsVisitor.STOP, thevisitInstanceLeave-method will be invoked immediately after this method, i.e., the visitor does not dive into the instantiation. Otherwise, the instantiation is performed, starting with an edge.- Specified by:
visitInstanceEnterin interfaceVisitor- Overrides:
visitInstanceEnterin classVisitorImpl- Returns:
- value to pass to
visitInstanceLeave, may beVisitor.STOP
-