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
Marks a scalar value.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ImplicitTupleprivate final DumperOptions.ScalarStyleprivate final Stringprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionScalarEvent(String anchor, String tag, ImplicitTuple implicit, String value, Mark startMark, Mark endMark, DumperOptions.ScalarStyle style) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGenerate human readable representation of the EventGet the type (kind) if this EventStyle of the scalar.getTag()Tag of this scalar.getValue()String representation of the value.booleanbooleanisFolded()booleanisJson()booleanbooleanisPlain()booleanMethods inherited from class org.yaml.snakeyaml.events.Event
equals, getEndMark, getStartMark, hashCode, is, toString
-
Field Details
-
tag
-
style
-
value
-
implicit
-
-
Constructor Details
-
ScalarEvent
public ScalarEvent(String anchor, String tag, ImplicitTuple implicit, String value, Mark startMark, Mark endMark, DumperOptions.ScalarStyle style)
-
-
Method Details
-
getTag
Tag of this scalar.- Returns:
- The tag of this scalar, or
nullif no explicit tag is available.
-
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:
-
getValue
String representation of the value.Without quotes and escaping.
- Returns:
- Value as Unicode string.
-
getImplicit
-
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
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()
-