org.yaml.snakeyaml.events
Class ScalarEvent

java.lang.Object
  extended by org.yaml.snakeyaml.events.Event
      extended by org.yaml.snakeyaml.events.NodeEvent
          extended by org.yaml.snakeyaml.events.ScalarEvent

public final class ScalarEvent
extends NodeEvent

Marks a scalar value.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.yaml.snakeyaml.events.Event
Event.ID
 
Constructor Summary
ScalarEvent(String anchor, String tag, ImplicitTuple implicit, String value, Mark startMark, Mark endMark, Character style)
           
 
Method Summary
protected  String getArguments()
           
 ImplicitTuple getImplicit()
           
 Character getStyle()
          Style of the scalar.
 String getTag()
          Tag of this scalar.
 String getValue()
          String representation of the value.
 boolean is(Event.ID id)
           
 
Methods inherited from class org.yaml.snakeyaml.events.NodeEvent
getAnchor
 
Methods inherited from class org.yaml.snakeyaml.events.Event
equals, getEndMark, getStartMark, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScalarEvent

public ScalarEvent(String anchor,
                   String tag,
                   ImplicitTuple implicit,
                   String value,
                   Mark startMark,
                   Mark endMark,
                   Character style)
Method Detail

getTag

public String getTag()
Tag of this scalar.

Returns:
The tag of this scalar, or null if no explicit tag is available.

getStyle

public Character getStyle()
Style of the scalar.
''
Flow Style - Plain
'\''
Flow Style - Single-Quoted
'"'
Flow Style - Double-Quoted
'|'
Block Style - Literal
'>'
Block Style - Folded

Returns:
Style of the scalar.
See Also:
http://yaml.org/spec/1.1/#id864487

getValue

public String getValue()
String representation of the value.

Without quotes and escaping.

Returns:
Value as Unicode string.

getImplicit

public ImplicitTuple getImplicit()

getArguments

protected String getArguments()
Overrides:
getArguments in class NodeEvent
See Also:
for Event in PyYAML

is

public boolean is(Event.ID id)
Specified by:
is in class Event


Copyright © 2008-2010. All Rights Reserved.