Package org.yaml.snakeyaml.events
Class CollectionStartEvent
java.lang.Object
org.yaml.snakeyaml.events.Event
org.yaml.snakeyaml.events.NodeEvent
org.yaml.snakeyaml.events.CollectionStartEvent
- Direct Known Subclasses:
MappingStartEvent
,SequenceStartEvent
Base class for the start events of the collection nodes.
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionStartEvent
(String anchor, String tag, boolean implicit, Mark startMark, Mark endMark, Boolean flowStyle) Deprecated.Since restored in v1.22.CollectionStartEvent
(String anchor, String tag, boolean implicit, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle) Create -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Generate human readable representation of the Eventtrue
if this collection is in flow style,false
for block style.boolean
true
if the tag can be omitted while this collection is emitted.getTag()
Tag of this collection.boolean
isFlow()
GetterMethods inherited from class org.yaml.snakeyaml.events.Event
equals, getEndMark, getEventId, getStartMark, hashCode, is, toString
-
Constructor Details
-
CollectionStartEvent
public CollectionStartEvent(String anchor, String tag, boolean implicit, Mark startMark, Mark endMark, DumperOptions.FlowStyle flowStyle) Create- Parameters:
anchor
- - its anchortag
- - its tagimplicit
- - thue when the tag is implicitly resolvedstartMark
- - startendMark
- - endflowStyle
- - style
-
CollectionStartEvent
@Deprecated public CollectionStartEvent(String anchor, String tag, boolean implicit, Mark startMark, Mark endMark, Boolean flowStyle) Deprecated.Since restored in v1.22. UseCollectionStartEvent(String, String, boolean, Mark, Mark, org.yaml.snakeyaml.DumperOptions.FlowStyle)
.Existed in older versions but replaced withDumperOptions.FlowStyle
-based constructor. Restored in v1.22 for backwards compatibility.
-
-
Method Details
-
getTag
Tag of this collection.- Returns:
- The tag of this collection, or
null
if no explicit tag is available.
-
getImplicit
public boolean getImplicit()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
true
if this collection is in flow style,false
for block style.- Returns:
- If this collection is in flow style.
-
getArguments
Description copied from class:Event
Generate human readable representation of the Event- Overrides:
getArguments
in classNodeEvent
- Returns:
- representation fore humans
- See Also:
-
isFlow
public boolean isFlow()Getter- Returns:
- true for FLOW (exclude BLOCK and AUTO)
-