Groovy 1.7.10

## groovy.util.slurpersupport
[Java] Class GPathResult

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          groovy.util.slurpersupport.GPathResult

All Implemented Interfaces:
  Buildable, Writable

    public abstract class GPathResult
    extends GroovyObjectSupport

Base class for representing lazy evaluated GPath expressions.

Authors:
  John Wilson

Field Summary
`protected String` | `name`
`protected Map` | `namespaceMap`
`protected String` | `namespacePrefix`
`protected Map` | `namespaceTagHints`
`protected GPathResult` | `parent`

Constructor Summary
`GPathResult(GPathResult parent, String name, String namespacePrefix, Map namespaceTagHints)` @param parent the GPathResult prior to the application of the expression creating this GPathResult

Method Summary
`protected void` | `appendNode(Object newValue)`
`Iterator` | `breadthFirst()` An iterator useful for traversing XML documents/fragments in breadth-first order.
`Iterator` | `childNodes()`
`GPathResult` | `children()`
`GPathResult` | `declareNamespace(Map newNamespaceMapping)`
`Iterator` | `depthFirst()`
`boolean` | `equals(Object obj)`
`GPathResult` | `find(Closure closure)`
`GPathResult` | `findAll(Closure closure)`
`Object` | `getAt(int index)`
`Object` | `getAt(IntRange range)`
`Closure` | `getBody()`
`Object` | `getProperty(String property)`
`boolean` | `isEmpty()`
`Iterator` | `iterator()`
`Object` | `leftShift(Object newValue)`
`List` | `list()`
`String` | `lookupNamespace(String prefix)`
`String` | `name()`
`Iterator` | `nodeIterator()`
`GPathResult` | `parent()`
`GPathResult` | `parents()`
`Object` | `plus(Object newValue)`
`void` | `putAt(int index, Object newValue)`
`protected void` | `replaceBody(Object newValue)`
`protected void` | `replaceNode(Closure newValue)`
`void` | `setMetaClass(MetaClass metaClass)`
`void` | `setProperty(String property, Object newValue)`
`int` | `size()`
`String` | `text()`
`BigDecimal` | `toBigDecimal()`
`BigInteger` | `toBigInteger()`
`Boolean` | `toBoolean()`
`Double` | `toDouble()`
`Float` | `toFloat()`
`Integer` | `toInteger()`
`Long` | `toLong()`
`String` | `toString()`
`URI` | `toURI()`
`URL` | `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

Field Detail

### name

    protected final String name

### namespaceMap

    protected final Map namespaceMap

### namespacePrefix

    protected final String namespacePrefix

### namespaceTagHints

    protected final Map namespaceTagHints

### parent

    protected final GPathResult parent

Constructor Detail

### GPathResult

    public GPathResult(GPathResult parent, String name, String namespacePrefix, Map namespaceTagHints)

  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
    `namespacePrefix` - the namespace prefix if any
    `namespaceTagHints` - the known tag to namespace mappings

Method Detail

### appendNode

    protected void appendNode(Object newValue)

### breadthFirst

    public Iterator breadthFirst()

  An iterator useful for traversing XML documents/fragments in breadth-first order.
  Returns:
    Iterator the iterator of GPathResult objects

### childNodes

    public Iterator childNodes()

### children

    public GPathResult children()

### declareNamespace

    public GPathResult declareNamespace(Map newNamespaceMapping)

### depthFirst

    public Iterator depthFirst()

### equals

    public boolean equals(Object obj)

### find

    public GPathResult find(Closure closure)

### findAll

    public GPathResult findAll(Closure closure)

### getAt

    public Object getAt(int index)

### getAt

    public Object getAt(IntRange range)

### getBody

    public Closure getBody()

### getProperty

    public Object getProperty(String property)

### isEmpty

    public boolean isEmpty()

### iterator

    public Iterator iterator()

### leftShift

    public Object leftShift(Object newValue)

### list

    public List list()

### lookupNamespace

    public String lookupNamespace(String prefix)

### name

    public String name()

### nodeIterator

    public Iterator nodeIterator()

### parent

    public GPathResult parent()

### parents

    public GPathResult parents()

### plus

    public Object plus(Object newValue)

### putAt

    public void putAt(int index, Object newValue)

### replaceBody

    protected void replaceBody(Object newValue)

### replaceNode

    protected void replaceNode(Closure newValue)

### setMetaClass

    @Override
    public void setMetaClass(MetaClass metaClass)

### setProperty

    public void setProperty(String property, Object newValue)

### size

    public int size()

### text

    public String text()

### toBigDecimal

    public BigDecimal toBigDecimal()

### toBigInteger

    public BigInteger toBigInteger()

### toBoolean

    public Boolean toBoolean()

### toDouble

    public Double toDouble()

### toFloat

    public Float toFloat()

### toInteger

    public Integer toInteger()

### toLong

    public Long toLong()

### toString

    public String toString()

### toURI

    public URI toURI()

### toURL

    public URL toURL()

Copyright © 2003-2010 The Codehaus. All rights reserved.