Package groovy.xml.slurpersupport
Class NoChildren
java.lang.Object
groovy.lang.GroovyObjectSupport
groovy.xml.slurpersupport.GPathResult
groovy.xml.slurpersupport.NoChildren
- All Implemented Interfaces:
- Buildable,- GroovyObject,- Writable,- Iterable
Lazy evaluated representation of a GPath expression returning no children.
 As this class represents a GPath expression with no results, all methods
 are either NOPs or return an empty result.
- 
Field SummaryFields inherited from class groovy.xml.slurpersupport.GPathResultname, namespaceMap, namespacePrefix, namespaceTagHints, parent
- 
Constructor SummaryConstructorsConstructorDescriptionNoChildren(GPathResult parent, String name, Map<String, String> namespaceTagHints) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidappendNode(Object newValue) NOPbooleanReturnsfalse.voidbuild(GroovyObject builder) NOPReturns an emptyIterator.Returnsthis.Returnsthis.iterator()Returns an emptyIterator.Returns an empty iterator.parents()Throws aGroovyRuntimeException, because it is not implemented yet.protected voidreplaceBody(Object newValue) NOPprotected voidreplaceNode(Closure newValue) NOPintsize()Returns0.text()Returns an emptyString.Does not write any output, just returns the writer.Methods inherited from class groovy.xml.slurpersupport.GPathResultbreadthFirst, children, createIterator, declareNamespace, depthFirst, equals, getAt, getAt, getBody, getProperty, hashCode, isEmpty, leftShift, list, lookupNamespace, name, parent, plus, plus, pop, putAt, setMetaClass, setProperty, toBigDecimal, toBigInteger, toBoolean, toDouble, toFloat, toInteger, toLong, toString, toURI, toURLMethods inherited from class groovy.lang.GroovyObjectSupportgetMetaClassMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface groovy.lang.GroovyObjectinvokeMethodMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Constructor Details- 
NoChildren- Parameters:
- parent- the GPathResult prior to the application of the expression creating this GPathResult
- name- if the GPathResult corresponds to something with a name, e.g. a node
- namespaceTagHints- the known tag to namespace mappings
 
 
- 
- 
Method Details- 
sizepublic int size()Returns0.- Specified by:
- sizein class- GPathResult
- Returns:
- 0
 
- 
textReturns an emptyString.- Specified by:
- textin class- GPathResult
- Returns:
- an empty String
 
- 
parentsThrows aGroovyRuntimeException, because it is not implemented yet.- Specified by:
- parentsin class- GPathResult
- Returns:
- the parents of this GPathResult
 
- 
childNodesReturns an emptyIterator.- Specified by:
- childNodesin class- GPathResult
- Returns:
- an empty Iterator
 
- 
iteratorReturns an emptyIterator.- Specified by:
- iteratorin interface- Iterable
- Specified by:
- iteratorin class- GPathResult
- Returns:
- an empty Iterator
 
- 
findReturnsthis.- Specified by:
- findin class- GPathResult
- Parameters:
- closure- a closure to filters the children of this GPathResult
- Returns:
- this
 
- 
findAllReturnsthis.- Specified by:
- findAllin class- GPathResult
- Parameters:
- closure- a closure to filters the children of this GPathResult
- Returns:
- this
 
- 
nodeIteratorReturns an empty iterator.- Specified by:
- nodeIteratorin class- GPathResult
- Returns:
- an empty iterator
 
- 
writeToDoes not write any output, just returns the writer.- Parameters:
- out- the Writer to which this Writable should output its data.
- Returns:
- the Writerwhich was passed in
- Throws:
- IOException- if an error occurred while outputting data to the writer
 
- 
buildNOP
- 
replaceNodeNOP- Specified by:
- replaceNodein class- GPathResult
 
- 
replaceBodyNOP- Specified by:
- replaceBodyin class- GPathResult
 
- 
appendNodeNOP- Specified by:
- appendNodein class- GPathResult
 
- 
asBooleanpublic boolean asBoolean()Returnsfalse.- Returns:
- false
 
 
-