Package org.yaml.snakeyaml.events
Class ScalarEvent
- java.lang.Object
-
- org.yaml.snakeyaml.events.Event
-
- org.yaml.snakeyaml.events.NodeEvent
-
- org.yaml.snakeyaml.events.ScalarEvent
-
public final class ScalarEvent extends NodeEvent
Marks a scalar value.
-
-
Field Summary
Fields Modifier and Type Field Description private ImplicitTupleimplicitprivate DumperOptions.ScalarStylestyleprivate java.lang.Stringtagprivate java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description ScalarEvent(java.lang.String anchor, java.lang.String tag, ImplicitTuple implicit, java.lang.String value, Mark startMark, Mark endMark, DumperOptions.ScalarStyle style)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetArguments()Generate human readable representation of the EventEvent.IDgetEventId()Get the type (kind) if this EventImplicitTuplegetImplicit()DumperOptions.ScalarStylegetScalarStyle()Style of the scalar.java.lang.StringgetTag()Tag of this scalar.java.lang.StringgetValue()String representation of the value.booleanisDQuoted()booleanisFolded()booleanisJson()booleanisLiteral()booleanisPlain()booleanisSQuoted()-
Methods inherited from class org.yaml.snakeyaml.events.Event
equals, getEndMark, getStartMark, hashCode, is, toString
-
-
-
-
Field Detail
-
tag
private final java.lang.String tag
-
style
private final DumperOptions.ScalarStyle style
-
value
private final java.lang.String value
-
implicit
private final ImplicitTuple implicit
-
-
Constructor Detail
-
ScalarEvent
public ScalarEvent(java.lang.String anchor, java.lang.String tag, ImplicitTuple implicit, java.lang.String value, Mark startMark, Mark endMark, DumperOptions.ScalarStyle style)
-
-
Method Detail
-
getTag
public java.lang.String getTag()
Tag of this scalar.- Returns:
- The tag of this scalar, or
nullif no explicit tag is available.
-
getScalarStyle
public DumperOptions.ScalarStyle getScalarStyle()
Style of the scalar.- null
- Flow Style - Plain
- '\''
- Flow Style - Single-Quoted
- '"'
- Flow Style - Double-Quoted
- '|'
- Block Style - Literal
- '>'
- Block Style - Folded
- Returns:
- Style of the scalar.
- See Also:
- Kind/Style Combinations
-
getValue
public java.lang.String getValue()
String representation of the value.Without quotes and escaping.
- Returns:
- Value as Unicode string.
-
getImplicit
public ImplicitTuple getImplicit()
-
getArguments
protected java.lang.String getArguments()
Description copied from class:EventGenerate human readable representation of the Event- Overrides:
getArgumentsin classNodeEvent- Returns:
- representation fore humans
- See Also:
- "__repr__ for Event in PyYAML"
-
getEventId
public Event.ID getEventId()
Description copied from class:EventGet the type (kind) if this Event- Specified by:
getEventIdin classEvent- Returns:
- the ID of this Event
-
isPlain
public boolean isPlain()
-
isLiteral
public boolean isLiteral()
-
isSQuoted
public boolean isSQuoted()
-
isDQuoted
public boolean isDQuoted()
-
isFolded
public boolean isFolded()
-
isJson
public boolean isJson()
-
-