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, String value, Mark startMark, Mark endMark, Character style)` Deprecated.
`ScalarNode(Tag tag, boolean resolved, String value, Mark startMark, Mark endMark, DumperOptions.ScalarStyle style)`
`ScalarNode(Tag tag, String value, Mark startMark, Mark endMark, Character style)` Deprecated.
`ScalarNode(Tag tag, String value, Mark startMark, Mark endMark, DumperOptions.ScalarStyle style)`

### Method Summary

Methods
`NodeId` `getNodeId()` For error reporting.
`DumperOptions.ScalarStyle` `getScalarStyle()` Get scalar style of this node.
`Character` `getStyle()` Deprecated. use getScalarStyle instead
`String` `getValue()` Value of this scalar.
`boolean` `isPlain()`
`String` `toString()`

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

`equals, getAnchor, getBlockComments, getEndComments, getEndMark, getInLineComments, getStartMark, getTag, getType, hashCode, isResolved, isTwoStepsConstruction, setAnchor, setBlockComments, setEndComments, setInLineComments, 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,
              String value,
              Mark startMark,
              Mark endMark,
              DumperOptions.ScalarStyle style)

#### ScalarNode

    public ScalarNode(Tag tag,
              boolean resolved,
              String value,
              Mark startMark,
              Mark endMark,
              DumperOptions.ScalarStyle style)

#### ScalarNode

    @Deprecated
    public ScalarNode(Tag tag,
                         String value,
                         Mark startMark,
                         Mark endMark,
                         Character style)

Deprecated.

#### ScalarNode

    @Deprecated
    public ScalarNode(Tag tag,
                         boolean resolved,
                         String value,
                         Mark startMark,
                         Mark endMark,
                         Character style)

Deprecated.

### Method Detail

#### getStyle

    @Deprecated
    public Character getStyle()

Deprecated. use getScalarStyle instead
Get scalar style of this node.

Returns:
  style of this scalar node
See Also:
  `ScalarEvent`, Chapter 9. Scalar Styles

#### getScalarStyle

    public DumperOptions.ScalarStyle getScalarStyle()

Get scalar style of this node.

Returns:
  style of this scalar 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 String getValue()

Value of this scalar.

Returns:
  Scalar's value.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### isPlain

    public boolean isPlain()