com.hazelcast.org.snakeyaml.engine.v1.nodes

## Class Node

- java.lang.Object
- - com.hazelcast.org.snakeyaml.engine.v1.nodes.Node

- Direct Known Subclasses:
    AnchorNode, CollectionNode, ScalarNode

      public abstract class Node
      extends Object

  Base class for all nodes.

  The nodes form the node-graph described in the YAML Specification.

  While loading, the node graph is usually created by the `Composer`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Optional<Mark>` | `endMark`
    `protected boolean` | `resolved` true when the tag is assigned by the resolver

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Node(Tag tag, Optional<Mark> startMark, Optional<Mark> endMark)` Create Node to be parsed

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)` Node is only equal to itself
    `Optional<ConstructNode>` | `getConstruct()`
    `Optional<Mark>` | `getEndMark()`
    `abstract NodeType` | `getNodeType()`
    `Optional<Mark>` | `getStartMark()`
    `Tag` | `getTag()` Tag of this node.
    `int` | `hashCode()`
    `boolean` | `isRecursive()` Indicates if this node must be constructed in two steps.
    `void` | `setConstruct(ConstructNode construct)`
    `void` | `setRecursive(boolean recursive)`
    `void` | `setTag(Tag tag)`

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

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

- - ### Field Detail

    - #### endMark

          protected Optional<Mark> endMark

    - #### resolved

          protected boolean resolved

      true when the tag is assigned by the resolver

  - ### Constructor Detail

    - #### Node

          public Node(Tag tag,
                      Optional<Mark> startMark,
                      Optional<Mark> endMark)

      Create Node to be parsed
      Parameters:
        `tag` - - the tag
        `startMark` - - start mark when available
        `endMark` - - end mark when available

  - ### Method Detail

    - #### getTag

          public Tag getTag()

      Tag of this node.

      Every node has a tag assigned. The tag is either local or global.

      Returns:
        Tag of this node.

    - #### getEndMark

          public Optional<Mark> getEndMark()

    - #### getNodeType

          public abstract NodeType getNodeType()

      Returns:
        scalar, sequence, mapping

    - #### getStartMark

          public Optional<Mark> getStartMark()

    - #### setTag

          public void setTag(Tag tag)

    - #### equals

          public final boolean equals(Object obj)

      Node is only equal to itself
      Overrides:
        `equals` in class `Object`

    - #### setRecursive

          public void setRecursive(boolean recursive)

    - #### isRecursive

          public boolean isRecursive()

      Indicates if this node must be constructed in two steps.

      Two-step construction is required whenever a node is a child (direct or indirect) of it self. That is, if a recursive structure is build using anchors and aliases.

      Set by `Composer`, used during the construction process.

      Only relevant during loading.

      Returns:
        `true` if the node is self referenced.

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getConstruct

          public Optional<ConstructNode> getConstruct()

    - #### setConstruct

          public void setConstruct(ConstructNode construct)

Copyright © 2019. All rights reserved.