public class VisitorUtils extends java.lang.Object
Constructor and Description |
---|
VisitorUtils() |
Modifier and Type | Method and Description |
---|---|
static <T,X extends java.lang.Exception> |
listAllDepthFirst(T start,
IMeshWalker<T,X> walker)
Lists all elements of a mesh in depth first order.
|
static <T,X1 extends java.lang.Exception,X2 extends java.lang.Exception> |
visitAllDepthFirst(T start,
IMeshWalker<T,X1> walker,
IVisitor<T,X2> visitor)
Visits all elements of a mesh in depth first order.
|
static <T,X1 extends java.lang.Exception,X2 extends java.lang.Exception> |
visitAllPreOrder(T root,
ITreeWalker<T,X1> walker,
IVisitor<T,X2> visitor)
Visits all nodes of a tree in pre-order, i.e.
|
static <T,X1 extends java.lang.Exception,X2 extends java.lang.Exception> |
visitLeaves(T root,
ITreeWalker<T,X1> walker,
IVisitor<T,X2> visitor)
Visits all leaves of a tree, i.e.
|
public VisitorUtils()
public static <T,X1 extends java.lang.Exception,X2 extends java.lang.Exception> void visitAllPreOrder(T root, ITreeWalker<T,X1> walker, IVisitor<T,X2> visitor) throws X1 extends java.lang.Exception, X2 extends java.lang.Exception
root
- the root of the tree.walker
- the walker user for traversing the tree.visitor
- the visitor used for visiting the nodes.X1 extends java.lang.Exception
public static <T,X1 extends java.lang.Exception,X2 extends java.lang.Exception> void visitLeaves(T root, ITreeWalker<T,X1> walker, IVisitor<T,X2> visitor) throws X1 extends java.lang.Exception, X2 extends java.lang.Exception
root
- the root of the tree.walker
- the walker user for traversing the tree.visitor
- the visitor used for visiting the nodes.X1 extends java.lang.Exception
public static <T,X1 extends java.lang.Exception,X2 extends java.lang.Exception> void visitAllDepthFirst(T start, IMeshWalker<T,X1> walker, IVisitor<T,X2> visitor) throws X1 extends java.lang.Exception, X2 extends java.lang.Exception
start
- the element to start the traversal from.walker
- the walker user for traversing the mesh.visitor
- the visitor used for visiting the elements.X1 extends java.lang.Exception
public static <T,X extends java.lang.Exception> java.util.List<T> listAllDepthFirst(T start, IMeshWalker<T,X> walker) throws X extends java.lang.Exception
start
- the element to start the traversal from.walker
- the walker user for traversing the mesh.X extends java.lang.Exception