You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2015/07/14 13:33:04 UTC
[jira] [Resolved] (GROOVY-7487) In groovy.util.Node please Provide
please add breathFirstGroupedByLevel
[ https://issues.apache.org/jira/browse/GROOVY-7487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul King resolved GROOVY-7487.
-------------------------------
Resolution: Won't Fix
Assignee: Paul King
Since fixing GROOVY-7488, this functionality is readily achieved (as per the unit test for that feature):
{code}
def root = createTreeFromXmlParser()
def result = [:].withDefault { [] }
root.depthFirst { node, index -> result[index] << node.name() }
assert result == [1: ['root'], 2: ['parent1', 'parent2'], 4: ['grandchild2'],
3: ['child1a', 'child1b', 'child2a', 'child2b', 'child2c']]
{code}
So, I am closing this issue.
> In groovy.util.Node please Provide please add breathFirstGroupedByLevel
> -----------------------------------------------------------------------
>
> Key: GROOVY-7487
> URL: https://issues.apache.org/jira/browse/GROOVY-7487
> Project: Groovy
> Issue Type: Improvement
> Components: groovy-jdk
> Reporter: Suminda Dharmasena
> Assignee: Paul King
> Priority: Minor
> Labels: usertask
>
> Please add a way to groupBy the level in breath 1st traversal
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)