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

public abstract Class CollectionStartEvent

extends NodeEvent
Class Inheritance
Known Direct Subclasses
org.snakeyaml.engine.v2.events.MappingStartEvent, org.snakeyaml.engine.v2.events.SequenceStartEvent
Imports
java.util.Objects, .Optional, org.snakeyaml.engine.v2.common.Anchor, .FlowStyle, org.snakeyaml.engine.v2.exceptions.Mark

Base class for the start events of the collection nodes.

Field Summary

Modifier and TypeField and Description
private final FlowStyle
private final boolean
private final Optional<String>

Constructor Summary

AccessConstructor and Description
public
CollectionStartEvent(Optional<Anchor> anchor, Optional<String> tag, boolean implicit, FlowStyle flowStyle, Optional<Mark> startMark, Optional<Mark> endMark)

Method Summary

Modifier and TypeMethod and Description
public FlowStyle

Returns:

If this collection is in flow style.
getFlowStyle
()

true if this collection is in flow style, false for block style.

public Optional<String>

Returns:

The tag of this collection, or empty if no explicit tag is available.
getTag
()

Tag of this collection.

public boolean
public boolean

Returns:

True if the tag can be omitted while this collection is emitted.
isImplicit
()

true if the tag can be omitted while this collection is emitted.

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

flowStyleback to summary
private final FlowStyle flowStyle
implicitback to summary
private final boolean implicit
tagback to summary
private final Optional<String> tag

Constructor Detail

CollectionStartEventback to summary
public CollectionStartEvent(Optional<Anchor> anchor, Optional<String> tag, boolean implicit, FlowStyle flowStyle, Optional<Mark> startMark, Optional<Mark> endMark)

Method Detail

getFlowStyleback to summary
public FlowStyle getFlowStyle()

true if this collection is in flow style, false for block style.

Returns:FlowStyle

If this collection is in flow style.

getTagback to summary
public Optional<String> getTag()

Tag of this collection.

Returns:Optional<String>

The tag of this collection, or empty if no explicit tag is available.

isFlowback to summary
public boolean isFlow()
isImplicitback to summary
public boolean isImplicit()

true if the tag can be omitted while this collection is emitted.

Returns:boolean

True if the tag can be omitted while this collection is emitted.

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