Package org.snakeyaml.engine.v2.events
Class ScalarEvent
java.lang.Object
org.snakeyaml.engine.v2.events.Event
org.snakeyaml.engine.v2.events.NodeEvent
org.snakeyaml.engine.v2.events.ScalarEvent
Marks a scalar value.
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ImplicitTuple
private final ScalarStyle
private final String
-
Constructor Summary
ConstructorsConstructorDescriptionScalarEvent
(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style) ScalarEvent
(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style, Optional<Mark> startMark, Optional<Mark> endMark) -
Method Summary
Methods inherited from class org.snakeyaml.engine.v2.events.Event
getEndMark, getStartMark
-
Field Details
-
tag
-
style
-
value
-
implicit
-
-
Constructor Details
-
ScalarEvent
-
ScalarEvent
public ScalarEvent(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style)
-
-
Method Details
-
getTag
Tag of this scalar.- Returns:
- The tag of this scalar, or
null
if 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.
-
getValue
String representation of the value.Without quotes and escaping.
- Returns:
- Value as Unicode string.
-
getImplicit
-
getEventId
Description copied from class:Event
Get the type (kind) if this Event- Specified by:
getEventId
in classEvent
- Returns:
- the ID of this Event
-
isPlain
public boolean isPlain() -
toString
-
escapedValue
-