public class NoChildren extends GPathResult
name, namespaceMap, namespacePrefix, namespaceTagHints, parent
Constructor and Description |
---|
NoChildren(GPathResult parent,
String name,
Map<String,String> namespaceTagHints) |
Modifier and Type | Method and Description |
---|---|
protected void |
appendNode(Object newValue)
NOP
|
boolean |
asBoolean()
Returns
false . |
void |
build(GroovyObject builder)
NOP
|
Iterator |
childNodes()
Returns an empty
Iterator . |
GPathResult |
find(Closure closure)
Returns
this . |
GPathResult |
findAll(Closure closure)
Returns
this . |
Iterator |
iterator()
Returns an empty
Iterator . |
Iterator |
nodeIterator()
Returns an empty iterator.
|
GPathResult |
parents()
Throws a
GroovyRuntimeException , because it is not implemented yet. |
protected void |
replaceBody(Object newValue)
NOP
|
protected void |
replaceNode(Closure newValue)
NOP
|
int |
size()
Returns
0 . |
String |
text()
Returns an empty
String . |
Writer |
writeTo(Writer out)
Does not write any output, just returns the writer.
|
breadthFirst, children, declareNamespace, depthFirst, equals, getAt, getAt, getBody, getProperty, isEmpty, leftShift, list, lookupNamespace, name, parent, plus, pop, putAt, setMetaClass, setProperty, toBigDecimal, toBigInteger, toBoolean, toDouble, toFloat, toInteger, toLong, toString, toURI, toURL
getMetaClass, invokeMethod
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEach, spliterator
public NoChildren(GPathResult parent, String name, Map<String,String> namespaceTagHints)
parent
- the GPathResult prior to the application of the expression creating this GPathResultname
- if the GPathResult corresponds to something with a name, e.g. a nodenamespaceTagHints
- the known tag to namespace mappingspublic int size()
0
.size
in class GPathResult
0
public String text()
String
.text
in class GPathResult
String
public GPathResult parents()
GroovyRuntimeException
, because it is not implemented yet.parents
in class GPathResult
public Iterator childNodes()
Iterator
.childNodes
in class GPathResult
Iterator
public Iterator iterator()
Iterator
.iterator
in interface Iterable
iterator
in class GPathResult
Iterator
public GPathResult find(Closure closure)
this
.find
in class GPathResult
closure
- a closure to filters the children of this GPathResultthis
public GPathResult findAll(Closure closure)
this
.findAll
in class GPathResult
closure
- a closure to filters the children of this GPathResultthis
public Iterator nodeIterator()
nodeIterator
in class GPathResult
public Writer writeTo(Writer out) throws IOException
out
- the Writer to which this Writable should output its data.Writer
which was passed inIOException
- if an error occurred while outputting data to the writerpublic void build(GroovyObject builder)
protected void replaceNode(Closure newValue)
replaceNode
in class GPathResult
protected void replaceBody(Object newValue)
replaceBody
in class GPathResult
protected void appendNode(Object newValue)
appendNode
in class GPathResult
public boolean asBoolean()
false
.false