|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovy.lang.GroovyObjectSupport groovy.util.slurpersupport.GPathResult groovy.util.slurpersupport.NoChildren
public class NoChildren extends GPathResult
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 Summary |
---|
Fields inherited from class GPathResult | |
---|---|
name, namespaceMap, namespacePrefix, namespaceTagHints, parent |
Constructor Summary | |
NoChildren(GPathResult parent, String name, Map namespaceTagHints)
@param parent the GPathResult prior to the application of the expression creating this GPathResult |
Method Summary | |
---|---|
protected void
|
appendNode(Object newValue)
NOP |
boolean
|
asBoolean()
Returns |
void
|
build(GroovyObject builder)
NOP |
Iterator
|
childNodes()
Returns an empty |
GPathResult
|
find(Closure closure)
Returns |
GPathResult
|
findAll(Closure closure)
Returns |
Iterator
|
iterator()
Returns an empty |
Iterator
|
nodeIterator()
Returns an empty iterator. |
GPathResult
|
parents()
Throws a |
protected void
|
replaceBody(Object newValue)
NOP |
protected void
|
replaceNode(Closure newValue)
NOP |
int
|
size()
Returns |
String
|
text()
Returns an empty |
Writer
|
writeTo(Writer out)
Does not write any output, just returns the writer. |
Methods inherited from class GPathResult | |
---|---|
appendNode, breadthFirst, childNodes, children, declareNamespace, depthFirst, equals, find, findAll, getAt, getAt, getBody, getProperty, isEmpty, iterator, leftShift, list, lookupNamespace, name, nodeIterator, parent, parents, plus, pop, putAt, replaceBody, replaceNode, setMetaClass, setProperty, size, text, toBigDecimal, toBigInteger, toBoolean, toDouble, toFloat, toInteger, toLong, toString, toURI, toURL |
Methods inherited from class GroovyObjectSupport | |
---|---|
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Constructor Detail |
---|
public NoChildren(GPathResult parent, String name, Map 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 mappings
Method Detail |
---|
protected void appendNode(Object newValue)
public boolean asBoolean()
false
.
false
public void build(GroovyObject builder)
public Iterator childNodes()
Iterator
.
Iterator
public GPathResult find(Closure closure)
this
.
this
public GPathResult findAll(Closure closure)
this
.
this
public Iterator iterator()
Iterator
.
Iterator
public Iterator nodeIterator()
public GPathResult parents()
GroovyRuntimeException
, because it is not implemented yet.
protected void replaceBody(Object newValue)
protected void replaceNode(Closure newValue)
public int size()
0
.
0
public String text()
String
.
String
public Writer writeTo(Writer out)
Writer
which was passed in
Copyright © 2003-2013 The Codehaus. All rights reserved.