public void depthFirst ( Map < String , Object > options , Closure c ) { boolean preorder = Boolean . valueOf ( options . get ( "preorder" ) . toString ( ) ) ; if ( preorder ) callClosureForNode ( c , this , 1 ) ; depthFirstRest ( preorder , 2 , c ) ; if ( ! preorder ) callClosureForNode ( c , this , 1 ) ; }
Provides a collection of all the nodes in the tree using a depth - first traversal . A boolean preorder options is supported .