Deprecated
| Modifier and Type | Field and Description |
|---|---|
| protected final String | |
| protected final Map | |
| protected final String | |
| protected final Map | |
| protected final GPathResult | parent
Deprecated
as a consequence of
GPathResult being deprecated.
|
| Access | Constructor and Description |
|---|---|
| public | GPathResult(final GPathResult
the GPathResult prior to the application of the expression creating this GPathResult parent, final String if the GPathResult corresponds to something with a name, e.g. a node name, final String the namespace prefix if any namespacePrefix, final Map<String, String> the known tag to namespace mappings namespaceTagHints)
Deprecated
as a consequence of
Creates a new GPathResult named GPathResult being deprecated.
name with the parent parent,
the namespacePrefix namespacePrefix and the namespaceTagHints specified in
the namespaceTagHints Map.
|
| Modifier and Type | Method and Description |
|---|---|
| protected abstract void | |
| public Iterator | Returns: theIterator of (breadth-first) ordered GPathResultsProvides an Iterator over all the nodes of this GPathResult using a breadth-first traversal. |
| public abstract Iterator | Returns: an iterator over the child nodes of this GPathResultReturns an iterator over the child nodes of this GPathResult. |
| public GPathResult | Returns: the children of this GPathResult
Deprecated
as a consequence of
Returns the children of this GPathResult as a GPathResult object.
GPathResult being deprecated.
|
| protected Iterator | |
| public GPathResult | Returns: thisthe mappings to add newNamespaceMapping)
Deprecated
as a consequence of
Adds the specified map of prefix to namespace mappings to this GPathResult.
GPathResult being deprecated.
|
| public Iterator | Returns: theIterator of (depth-first) ordered GPathResultsProvides an Iterator over all the nodes of this GPathResult using a depth-first traversal. |
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public abstract GPathResult | Returns: the first child matching the closurea closure to filters the children of this GPathResult closure)
Deprecated
as a consequence of
Returns the first child of this GPathResult matching the condition(s)
specified in the passed closure.
GPathResult being deprecated.
|
| public abstract GPathResult | Returns: the children matching the closurea closure to filters the children of this GPathResult closure)
Deprecated
as a consequence of
Returns the children of this GPathResult matching the condition(s)
specified in the passed closure.
GPathResult being deprecated.
|
| public Object | Returns: the value at the given indexan index index)Supports the subscript operator for a GPathResult. |
| public Object | |
| public Closure | Returns: the body of this GPathResult, converted to aClosureCreates a Closure representing the body of this GPathResult. |
| public Object | getProperty(final String
the Property to fetch property)Overrides default groovy. |
| public int | |
| public boolean | Returns: true if the GPathResult is emptyReturns true if the GPathResult is empty, i.e. if, and only if, |
| public abstract Iterator | |
| public Object | |
| public List | Returns: a list representing of this GPathResultCreates a list of objects representing this GPathResult. |
| public String | Returns: the namespace of the prefixthe prefix lookup prefix)Returns the namespace mapped to the specified prefix. |
| public String | |
| public abstract Iterator | |
| public GPathResult | Returns: the parents GPathResult orthis for the root
Deprecated
as a consequence of
Returns as GPathResult with the parent nodes of the current GPathResult
GPathResult being deprecated.
|
| public abstract GPathResult | Returns: the parents of this GPathResult
Deprecated
as a consequence of
Returns the parents of this GPathResult as a GPathResult being deprecated.
GPathResult.
|
| public Object | |
| public GPathResult | Returns: the parent orthis
Deprecated
as a consequence of
Returns the parent of this GPathResult.
GPathResult being deprecated.
|
| public void | |
| protected abstract void | |
| protected abstract void | |
| public void | setMetaClass(final MetaClass
the new MetaClass metaClass)Overrides groovy. Implements groovy. |
| public void | setProperty(final String
the property of this GPathResult to replace property, final Object the new value of the property newValue)Overrides default groovy. |
| public abstract int | |
| public abstract String | |
| private boolean | |
| public BigDecimal | Returns: the GPathResult, converted to aBigDecimalConverts the text of this GPathResult to a BigDecimal object. |
| public BigInteger | Returns: the GPathResult, converted to aBigIntegerConverts the text of this GPathResult to a BigInteger object. |
| public Boolean | Returns: the GPathResult, converted to aBooleanConverts the text of this GPathResult to a Boolean object. |
| public Double | Returns: the GPathResult, converted to aDoubleConverts the text of this GPathResult to a Double object. |
| public Float | Returns: the GPathResult, converted to aFloatConverts the text of this GPathResult to a Float object. |
| public Integer | Returns: the GPathResult, converted to aIntegerConverts the text of this GPathResult to a Integer object. |
| public Long | Returns: the GPathResult, converted to aLongConverts the text of this GPathResult to a Long object. |
| public String | Returns: the GPathResult, converted to aStringOverrides java. |
| public URI | Returns: the GPathResult, converted to aURIConverts the text of this GPathResult to a URI object. |
| public URL | Returns: the GPathResult, converted to aURLConverts the text of this GPathResult to a URL object. |
| name | back to summary |
|---|---|
| protected final String name | |
| namespaceMap | back to summary |
|---|---|
| protected final Map<K, V> namespaceMap | |
| namespacePrefix | back to summary |
|---|---|
| protected final String namespacePrefix | |
| namespaceTagHints | back to summary |
|---|---|
| protected final Map<String, String> namespaceTagHints | |
| parent | back to summary |
|---|---|
| protected final GPathResult parent
Deprecated as a consequence of | |
| GPathResult | back to summary |
|---|---|
| public GPathResult(final GPathResult parent, final String name, final String namespacePrefix, final Map<String, String> namespaceTagHints)
Deprecated as a consequence of Creates a new GPathResult named
| |
| appendNode | back to summary |
|---|---|
| protected abstract void appendNode(Object newValue) | |
| breadthFirst | back to summary |
|---|---|
| public Iterator Provides an Iterator over all the nodes of this GPathResult using a breadth-first traversal.
| |
| childNodes | back to summary |
|---|---|
| public abstract Iterator Returns an iterator over the child nodes of this GPathResult.
| |
| children | back to summary |
|---|---|
| public GPathResult children()
Deprecated as a consequence of Returns the children of this GPathResult as a GPathResult object.
| |
| createIterator | back to summary |
|---|---|
| protected Iterator | |
| declareNamespace | back to summary |
|---|---|
| public GPathResult declareNamespace(final Map<K, V> newNamespaceMapping)
Deprecated as a consequence of Adds the specified map of prefix to namespace mappings to this GPathResult. Already existing prefixes are overwritten.
| |
| depthFirst | back to summary |
|---|---|
| public Iterator Provides an Iterator over all the nodes of this GPathResult using a depth-first traversal.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| find | back to summary |
|---|---|
| public abstract GPathResult find(Closure<V> closure)
Deprecated as a consequence of Returns the first child of this GPathResult matching the condition(s) specified in the passed closure.
| |
| findAll | back to summary |
|---|---|
| public abstract GPathResult findAll(Closure<V> closure)
Deprecated as a consequence of Returns the children of this GPathResult matching the condition(s) specified in the passed closure.
| |
| getAt | back to summary |
|---|---|
| public Object getAt(final int index) Supports the subscript operator for a GPathResult.
import groovy.util.slurpersupport.*
def text = """
<characterList>
<character/>
<character>
<name>Gromit</name>
</character>
</characterList>"""
GPathResult characterList = new XmlSlurper().parseText(text)
assert characterList.character[1].name == 'Gromit'
| |
| getAt | back to summary |
|---|---|
| public Object getAt(final IntRange range) Supports the range subscript operator for a GPathResult.
import groovy.util.slurpersupport.*
def text = """
<characterList>
<character>Wallace</character>
<character>Gromit</character>
<character>Shaun</character>
</characterList>"""
GPathResult characterList = new XmlSlurper().parseText(text)
assert characterList.character[1..2].join(',') == 'Gromit,Shaun'
| |
| getBody | back to summary |
|---|---|
| public Closure Creates a Closure representing the body of this GPathResult.
| |
| getProperty | back to summary |
|---|---|
| public Object getProperty(final String property) Overrides default groovy. Returns the specified Property of this GPathResult. Realizes the follow shortcuts:
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the GPathResult is empty, i.e. if, and only if,
| |
| iterator | back to summary |
|---|---|
| public abstract Iterator Redeclares java. Doc from java. Returns an iterator over elements of type
| |
| leftShift | back to summary |
|---|---|
| public Object leftShift(final Object newValue) Overloads the left shift operator to provide an easy way to lazily append Objects to this GPathResult. | |
| list | back to summary |
|---|---|
| public List Creates a list of objects representing this GPathResult.
| |
| lookupNamespace | back to summary |
|---|---|
| public String lookupNamespace(final String prefix) Returns the namespace mapped to the specified prefix. | |
| name | back to summary |
|---|---|
| public String name() Returns the name of this GPathResult.
| |
| nodeIterator | back to summary |
|---|---|
| public abstract Iterator | |
| parent | back to summary |
|---|---|
| public GPathResult parent()
Deprecated as a consequence of Returns as GPathResult with the parent nodes of the current GPathResult
| |
| parents | back to summary |
|---|---|
| public abstract GPathResult parents()
Deprecated as a consequence of Returns the parents of this GPathResult as a Warning The subclasses of this package do not implement this method yet.
| |
| plus | back to summary |
|---|---|
| public Object plus(final Object newValue) Lazily adds the specified Object to this GPathResult. | |
| pop | back to summary |
|---|---|
| public GPathResult pop()
Deprecated as a consequence of 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.
| |
| putAt | back to summary |
|---|---|
| public void putAt(final int index, final Object newValue) A helper method to allow GPathResults to work with subscript operators
| |
| replaceBody | back to summary |
|---|---|
| protected abstract void replaceBody(Object newValue) | |
| replaceNode | back to summary |
|---|---|
| protected abstract void replaceNode(Closure<V> newValue) | |
| setMetaClass | back to summary |
|---|---|
| public void setMetaClass(final MetaClass metaClass) Overrides groovy. Implements groovy. Replaces the MetaClass of this GPathResult. | |
| setProperty | back to summary |
|---|---|
| public void setProperty(final String property, final Object newValue) Overrides default groovy. Replaces the specified property of this GPathResult with a new value. | |
| size | back to summary |
|---|---|
| public abstract int size() Returns the size of this GPathResult.
| |
| text | back to summary |
|---|---|
| public abstract String text() Returns the text of this GPathResult as a
| |
| textIsEmptyOrNull | back to summary |
|---|---|
| private boolean textIsEmptyOrNull() | |
| toBigDecimal | back to summary |
|---|---|
| public BigDecimal toBigDecimal() Converts the text of this GPathResult to a BigDecimal object.
| |
| toBigInteger | back to summary |
|---|---|
| public BigInteger toBigInteger() Converts the text of this GPathResult to a BigInteger object.
| |
| toBoolean | back to summary |
|---|---|
| public Boolean toBoolean() Converts the text of this GPathResult to a Boolean object.
| |
| toDouble | back to summary |
|---|---|
| public Double toDouble() Converts the text of this GPathResult to a Double object.
| |
| toFloat | back to summary |
|---|---|
| public Float toFloat() Converts the text of this GPathResult to a Float object.
| |
| toInteger | back to summary |
|---|---|
| public Integer toInteger() Converts the text of this GPathResult to a Integer object.
| |
| toLong | back to summary |
|---|---|
| public Long toLong() Converts the text of this GPathResult to a Long object.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the text of this GPathResult.
| |
| toURI | back to summary |
|---|---|
| public URI toURI() throws URISyntaxException Converts the text of this GPathResult to a URI object.
| |
| toURL | back to summary |
|---|---|
| public URL toURL() throws MalformedURLException Converts the text of this GPathResult to a URL object.
| |