Package groovy.util.slurpersupport

## Class NoChildren

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

- All Implemented Interfaces:
    `Buildable`, `GroovyObject`, `Writable`, `Iterable`

      @Deprecated
      public class NoChildren
      extends GPathResult

  Deprecated.
  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 groovy.util.slurpersupport.GPathResult

      `name, namespaceMap, namespacePrefix, namespaceTagHints, parent`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `NoChildren​(GPathResult parent, String name, Map<String,​String> namespaceTagHints)` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `appendNode​(Object newValue)` | Deprecated. NOP
    `boolean` | `asBoolean()` | Deprecated. Returns `false`.
    `void` | `build​(GroovyObject builder)` | Deprecated. NOP
    `Iterator` | `childNodes()` | Deprecated. Returns an empty `Iterator`.
    `GPathResult` | `find​(Closure closure)` | Deprecated. Returns `this`.
    `GPathResult` | `findAll​(Closure closure)` | Deprecated. Returns `this`.
    `Iterator` | `iterator()` | Deprecated. Returns an empty `Iterator`.
    `Iterator` | `nodeIterator()` | Deprecated. Returns an empty iterator.
    `GPathResult` | `parents()` | Deprecated. Throws a `GroovyRuntimeException`, because it is not implemented yet.
    `protected void` | `replaceBody​(Object newValue)` | Deprecated. NOP
    `protected void` | `replaceNode​(Closure newValue)` | Deprecated. NOP
    `int` | `size()` | Deprecated. Returns `0`.
    `String` | `text()` | Deprecated. Returns an empty `String`.
    `Writer` | `writeTo​(Writer out)` | Deprecated. Does not write any output, just returns the writer.

    - ### Methods inherited from class groovy.util.slurpersupport.GPathResult

      `breadthFirst, children, createIterator, declareNamespace, depthFirst, equals, getAt, getAt, getBody, getProperty, hashCode, isEmpty, leftShift, list, lookupNamespace, name, parent, plus, pop, putAt, setMetaClass, setProperty, toBigDecimal, toBigInteger, toBoolean, toDouble, toFloat, toInteger, toLong, toString, toURI, toURL`

    - ### Methods inherited from class groovy.lang.GroovyObjectSupport

      `getMetaClass`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface groovy.lang.GroovyObject

      `invokeMethod`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Constructor Detail

    - #### NoChildren

          public NoChildren​(GPathResult parent,
                            String name,
                            Map<String,​String> namespaceTagHints)

      Deprecated.
      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 Detail

    - #### size

          public int size()

      Deprecated.
      Returns `0`.
      Specified by:
        `size` in class `GPathResult`
      Returns:
        `0`

    - #### text

          public String text()

      Deprecated.
      Returns an empty `String`.
      Specified by:
        `text` in class `GPathResult`
      Returns:
        an empty `String`

    - #### parents

          public GPathResult parents()

      Deprecated.
      Throws a `GroovyRuntimeException`, because it is not implemented yet.
      Specified by:
        `parents` in class `GPathResult`
      Returns:
        the parents of this GPathResult

    - #### childNodes

          public Iterator childNodes()

      Deprecated.
      Returns an empty `Iterator`.
      Specified by:
        `childNodes` in class `GPathResult`
      Returns:
        an empty `Iterator`

    - #### iterator

          public Iterator iterator()

      Deprecated.
      Returns an empty `Iterator`.
      Specified by:
        `iterator` in interface `Iterable`
      Specified by:
        `iterator` in class `GPathResult`
      Returns:
        an empty `Iterator`

    - #### find

          public GPathResult find​(Closure closure)

      Deprecated.
      Returns `this`.
      Specified by:
        `find` in class `GPathResult`
      Parameters:
        `closure` - a closure to filters the children of this GPathResult
      Returns:
        `this`

    - #### findAll

          public GPathResult findAll​(Closure closure)

      Deprecated.
      Returns `this`.
      Specified by:
        `findAll` in class `GPathResult`
      Parameters:
        `closure` - a closure to filters the children of this GPathResult
      Returns:
        `this`

    - #### nodeIterator

          public Iterator nodeIterator()

      Deprecated.
      Returns an empty iterator.
      Specified by:
        `nodeIterator` in class `GPathResult`
      Returns:
        an empty iterator

    - #### writeTo

          public Writer writeTo​(Writer out)
                         throws IOException

      Deprecated.
      Does not write any output, just returns the writer.
      Parameters:
        `out` - the Writer to which this Writable should output its data.
      Returns:
        the `Writer` which was passed in
      Throws:
        `IOException` - if an error occurred while outputting data to the writer

    - #### build

          public void build​(GroovyObject builder)

      Deprecated.
      NOP

    - #### replaceNode

          protected void replaceNode​(Closure newValue)

      Deprecated.
      NOP
      Specified by:
        `replaceNode` in class `GPathResult`

    - #### replaceBody

          protected void replaceBody​(Object newValue)

      Deprecated.
      NOP
      Specified by:
        `replaceBody` in class `GPathResult`

    - #### appendNode

          protected void appendNode​(Object newValue)

      Deprecated.
      NOP
      Specified by:
        `appendNode` in class `GPathResult`

    - #### asBoolean

          public boolean asBoolean()

      Deprecated.
      Returns `false`.
      Returns:
        `false`