Package org.snakeyaml.engine.v2.events
Class CollectionStartEvent
- java.lang.Object
-
- org.snakeyaml.engine.v2.events.Event
-
- org.snakeyaml.engine.v2.events.NodeEvent
-
- org.snakeyaml.engine.v2.events.CollectionStartEvent
-
- Direct Known Subclasses:
MappingStartEvent
,SequenceStartEvent
public abstract class CollectionStartEvent extends NodeEvent
Base class for the start events of the collection nodes.
-
-
Constructor Summary
Constructors Constructor Description CollectionStartEvent(java.util.Optional<Anchor> anchor, java.util.Optional<java.lang.String> tag, boolean implicit, FlowStyle flowStyle, java.util.Optional<Mark> startMark, java.util.Optional<Mark> endMark)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FlowStyle
getFlowStyle()
true
if this collection is in flow style,false
for block style.java.util.Optional<java.lang.String>
getTag()
Tag of this collection.boolean
isFlow()
boolean
isImplicit()
true
if the tag can be omitted while this collection is emitted.java.lang.String
toString()
-
Methods inherited from class org.snakeyaml.engine.v2.events.Event
getEndMark, getEventId, getStartMark
-
-
-
-
Field Detail
-
tag
private final java.util.Optional<java.lang.String> tag
-
implicit
private final boolean implicit
-
flowStyle
private final FlowStyle flowStyle
-
-
Method Detail
-
getTag
public java.util.Optional<java.lang.String> getTag()
Tag of this collection.- Returns:
- The tag of this collection, or
empty
if no explicit tag is available.
-
isImplicit
public boolean isImplicit()
true
if the tag can be omitted while this collection is emitted.- Returns:
- True if the tag can be omitted while this collection is emitted.
-
getFlowStyle
public FlowStyle getFlowStyle()
true
if this collection is in flow style,false
for block style.- Returns:
- If this collection is in flow style.
-
isFlow
public boolean isFlow()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-