groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7486) In groovy.util.Node.depthFirst please Provide a way to Specify In-order, pre-order, post-order Ordering
Date Mon, 13 Jul 2015 15:23:05 GMT

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

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

Github user paulk-asert commented on a diff in the pull request:

    https://github.com/apache/incubator-groovy/pull/59#discussion_r34474352
  
    --- 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 --
    
    I am not sure I understand where you are going with the BST idea but I have tweaked the
tests a little as per your earlier comments.


> 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)

Mime
View raw message