org.yaml.snakeyaml.nodes
Class ScalarNode

java.lang.Object
  extended by org.yaml.snakeyaml.nodes.Node
      extended by 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
ScalarNode(Tag tag, boolean resolved, String value, Mark startMark, Mark endMark, Character style)
           
ScalarNode(Tag tag, String value, Mark startMark, Mark endMark, Character style)
           
 
Method Summary
 NodeId getNodeId()
          For error reporting.
 Character getStyle()
          Get scalar style of this node.
 String getValue()
          Value of this scalar.
 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,
                  String value,
                  Mark startMark,
                  Mark endMark,
                  Character style)

ScalarNode

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

getStyle

public Character getStyle()
Get scalar style of this node.

Returns:
See Also:
ScalarEvent, http://yaml.org/spec/1.1/#id864487

getNodeId

public NodeId getNodeId()
Description copied from class: Node
For error reporting.

Specified by:
getNodeId in class Node
Returns:
scalar, sequence, mapping
See Also:
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


Copyright © 2008-2010. All Rights Reserved.