Package: groovy.console

## [Groovy] Class TextNode

- groovy.console.TextNode

-     @CompileStatic
      class TextNode
      extends Object

  Represents a plain text node for use in the AST tree made by ASTBrowser.

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `List` | `children` Child nodes in insertion order.
    `TextNode` | `parent` Parent node in the text tree.
    `List<List<?>>` | `properties` Additional name/value metadata shown for this node.
    `Object` | `userObject` Value displayed for this node.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `TextNode(Object userObject)` Creates a node with the supplied display value.
    `TextNode(Object userObject, List<List<?>> properties)` Creates a node with the supplied display value and metadata.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `add(TextNode child)` Adds a child node.
    `` | `void` | `setParent(TextNode newParent)` Sets the parent node.
    `` | `String` | `toString()` Returns the display text for this node.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Property Detail

    - #### List children

      Child nodes in insertion order.

    - #### TextNode parent

      Parent node in the text tree.

    - #### List<List<?>> properties

      Additional name/value metadata shown for this node.

    - #### Object userObject

      Value displayed for this node.

  - ### Constructor Detail

    - #### TextNode(Object userObject)

      Creates a node with the supplied display value.

      Parameters:
        `userObject` - value displayed for the node

    - #### TextNode(Object userObject, List<List<?>> properties)

      Creates a node with the supplied display value and metadata.

      Parameters:
        `userObject` - value displayed for the node
        `properties` - metadata associated with the node

  - ### Method Detail

    - #### void add(TextNode child)

      Adds a child node.

      Parameters:
        `child` - child node to append

    - #### void setParent(TextNode newParent)

      Sets the parent node.

      Parameters:
        `newParent` - parent node reference

    - #### String toString()

      Returns the display text for this node.

      Returns:
        the node text