[ 
https://issues.apache.org/jira/browse/GROOVY-7486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14624767#comment-14624767
 ] 

ASF GitHub Bot commented on GROOVY-7486:
----------------------------------------

Github user keeganwitt commented on a diff in the pull request:

    https://github.com/apache/incubator-groovy/pull/59#discussion_r34473051
  
    --- Diff: src/main/groovy/util/Node.java ---
    @@ -537,26 +539,40 @@ private NodeList getByName(String name) {
     
         /**
          * Provides a collection of all the nodes in the tree
    -     * using a depth first traversal.
    +     * using a depth-first preorder traversal.
          *
          * @return the list of (depth-first) ordered nodes
          */
         public List depthFirst() {
    +        return depthFirst(true);
    +    }
    +
    +    /**
    +     * Provides a collection of all the nodes in the tree
    +     * using a depth-first traversal.
    +     *
    +     * @param preorder if false, a postorder depth-first traversal will be 
performed
    --- End diff --
    
    That's true, but one could convert the tree to a BST before performing the 
traversal.  Pretty expensive, but could be done.


> In groovy.util.Node.depthFirst please Provide a way to Specify In-order, 
> pre-order, post-order Ordering
> -------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7486
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7486
>             Project: Groovy
>          Issue Type: Improvement
>          Components: groovy-jdk
>            Reporter: Suminda Dharmasena
>            Priority: Minor
>
> Please provide a way to specify the ordering in depth 1st traversal.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to