Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.events

public final Class ScalarEvent

extends NodeEvent
Class Inheritance
Imports
java.util.Objects, .Optional, java.util.stream.Collectors, org.snakeyaml.engine.v2.common.Anchor, .CharConstants, .ScalarStyle, org.snakeyaml.engine.v2.exceptions.Mark

Marks a scalar value.

Field Summary

Modifier and TypeField and Description
private final ImplicitTuple
private final ScalarStyle
private final Optional<String>
private final String

Constructor Summary

AccessConstructor and Description
public
ScalarEvent(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style, Optional<Mark> startMark, Optional<Mark> endMark)

public
ScalarEvent(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style)

Method Summary

Modifier and TypeMethod and Description
public String
public Event.ID
getEventId()

Implements abstract org.snakeyaml.engine.v2.events.Event.getEventId.

Get the type (kind) if this Event

public ImplicitTuple
public ScalarStyle

Returns:

Style of the scalar.
getScalarStyle
()

Style of the scalar.

public Optional<String>

Returns:

The tag of this scalar, or null if no explicit tag is available.
getTag
()

Tag of this scalar.

public String

Returns:

Value as Unicode string.
getValue
()

String representation of the value.

public boolean
public boolean
public boolean
public boolean
public boolean
public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.snakeyaml.engine.v2.events.NodeEvent:
getAnchor

Field Detail

implicitback to summary
private final ImplicitTuple implicit
styleback to summary
private final ScalarStyle style
tagback to summary
private final Optional<String> tag
valueback to summary
private final String value

Constructor Detail

ScalarEventback to summary
public ScalarEvent(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style, Optional<Mark> startMark, Optional<Mark> endMark)
ScalarEventback to summary
public ScalarEvent(Optional<Anchor> anchor, Optional<String> tag, ImplicitTuple implicit, String value, ScalarStyle style)

Method Detail

escapedValueback to summary
public String escapedValue()
getEventIdback to summary
public Event.ID getEventId()

Implements abstract org.snakeyaml.engine.v2.events.Event.getEventId.

Doc from org.snakeyaml.engine.v2.events.Event.getEventId.

Get the type (kind) if this Event

Annotations
@Override
getImplicitback to summary
public ImplicitTuple getImplicit()
getScalarStyleback to summary
public 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:ScalarStyle

Style of the scalar.

getTagback to summary
public Optional<String> getTag()

Tag of this scalar.

Returns:Optional<String>

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

getValueback to summary
public String getValue()

String representation of the value.

Without quotes and escaping.

Returns:String

Value as Unicode string.

isDQuotedback to summary
public boolean isDQuoted()
isFoldedback to summary
public boolean isFolded()
isJsonback to summary
public boolean isJson()
isLiteralback to summary
public boolean isLiteral()
isPlainback to summary
public boolean isPlain()
isSQuotedback to summary
public boolean isSQuoted()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override