org.yaml.snakeyaml.nodes

## Class ScalarNode

- java.lang.Object
- - org.yaml.snakeyaml.nodes.Node
  - - org.yaml.snakeyaml.nodes.ScalarNode

    public class ScalarNode
    extends Node

Represents a scalar node.

Scalar nodes form the leaves in the node graph.

### Field Summary

### Fields inherited from class org.yaml.snakeyaml.nodes.Node

`endMark, resolved, useClassConstructor`

### Constructor Summary

Constructors
Constructor and Description
`ScalarNode(Tag tag, boolean resolved, java.lang.String value, Mark startMark, Mark endMark, java.lang.Character style)`
`ScalarNode(Tag tag, java.lang.String value, Mark startMark, Mark endMark, java.lang.Character style)`

### Method Summary

Methods
`NodeId` `getNodeId()` For error reporting.
`java.lang.Character` `getStyle()` Get scalar style of this node.
`java.lang.String` `getValue()` Value of this scalar.
`java.lang.String` `toString()`

### Methods inherited from class org.yaml.snakeyaml.nodes.Node

`equals, getEndMark, getStartMark, getTag, getType, hashCode, isResolved, isTwoStepsConstruction, setTag, setTwoStepsConstruction, setType, setUseClassConstructor, useClassConstructor`

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

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

### Constructor Detail

#### ScalarNode

    public ScalarNode(Tag tag,
              java.lang.String value,
              Mark startMark,
              Mark endMark,
              java.lang.Character style)

#### ScalarNode

    public ScalarNode(Tag tag,
              boolean resolved,
              java.lang.String value,
              Mark startMark,
              Mark endMark,
              java.lang.Character style)

### Method Detail

#### getStyle

    public java.lang.Character getStyle()

Get scalar style of this node.

See Also:
  `ScalarEvent`, Chapter 9. Scalar Styles

#### getNodeId

    public NodeId getNodeId()

Description copied from class: `Node`
For error reporting.

Specified by:
  `getNodeId` in class `Node`
Returns:
  scalar, sequence, mapping
See Also:
  "class variable 'id' in PyYAML"

#### getValue

    public java.lang.String getValue()

Value of this scalar.

Returns:
  Scalar's value.

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`