Top Description Fields Constructors Methods
groovy.xml.slurpersupport

public Class FilteredNodeChildren

extends NodeChildren
Class Inheritance
Imports
groovy.lang.Closure, org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation, java.util.Iterator, .Map

Lazy evaluated representation of child nodes filtered by a Closure.

Field Summary

Modifier and TypeField and Description
private final Closure<V>

Constructor Summary

AccessConstructor and Description
public
FilteredNodeChildren(final GPathResult
the GPathResult prior to the application of the expression creating this GPathResult
parent
,
final Closure<V>
the Closure to use to filter the nodes
closure
,
final Map<String, String>
the known tag to namespace mappings
namespaceTagHints
)

Method Summary

Modifier and TypeMethod and Description
private boolean
public Iterator<E>
public GPathResult
pop()

Overrides groovy.xml.slurpersupport.GPathResult.pop.

Returns the parent of this GPathResult.
Inherited from groovy.xml.slurpersupport.NodeChildren:
appendNodebuildchildNodesfindfindAlliteratorparentsreplaceBodyreplaceNodesizetextwriteTo

Field Detail

closureback to summary
private final Closure<V> closure

Constructor Detail

FilteredNodeChildrenback to summary
public FilteredNodeChildren(final GPathResult parent, final Closure<V> closure, final Map<String, String> namespaceTagHints)
Parameters
parent:GPathResult

the GPathResult prior to the application of the expression creating this GPathResult

closure:Closure<V>

the Closure to use to filter the nodes

namespaceTagHints:Map<String, String>

the known tag to namespace mappings

Method Detail

closureYieldsTrueForNodeback to summary
private boolean closureYieldsTrueForNode(Object childNode)
nodeIteratorback to summary
public Iterator<E> nodeIterator()

Overrides groovy.xml.slurpersupport.NodeChildren.nodeIterator.

popback to summary
public GPathResult pop()

Overrides groovy.xml.slurpersupport.GPathResult.pop.

Doc from groovy.xml.slurpersupport.GPathResult.pop.

Returns the parent of this GPathResult. If this GPathResult has no parent the GPathResult itself is returned. This is no navigation in the XML tree. It is backtracking on the GPath expression chain. It is the behavior of parent() prior to 2.2.0. Backtracking on '..' actually goes down one level in the tree again. find() and findAll() are popped along with the level they have been applied to.

Returns:GPathResult

the parent or this