Package org.snakeyaml.engine.v2.events
Class DocumentStartEvent
- java.lang.Object
-
- org.snakeyaml.engine.v2.events.Event
-
- org.snakeyaml.engine.v2.events.DocumentStartEvent
-
public final class DocumentStartEvent extends Event
Marks the beginning of a document.This event followed by the document's content and a
DocumentEndEvent.
-
-
Constructor Summary
Constructors Constructor Description DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String,String> tags)DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String,String> tags, Optional<Mark> startMark, Optional<Mark> endMark)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Event.IDgetEventId()Get the type (kind) if this EventOptional<SpecVersion>getSpecVersion()Map<String,String>getTags()Tag shorthands as defined by the%TAGdirective.booleanisExplicit()StringtoString()-
Methods inherited from class org.snakeyaml.engine.v2.events.Event
getEndMark, getStartMark
-
-
-
-
Constructor Detail
-
DocumentStartEvent
public DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String,String> tags, Optional<Mark> startMark, Optional<Mark> endMark)
-
DocumentStartEvent
public DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String,String> tags)
-
-
Method Detail
-
isExplicit
public boolean isExplicit()
-
getSpecVersion
public Optional<SpecVersion> getSpecVersion()
- Returns:
- YAML version the document conforms to.
-
getTags
public Map<String,String> getTags()
Tag shorthands as defined by the%TAGdirective.- Returns:
- Mapping of 'handles' to 'prefixes' (the handles include the '!' characters).
-
getEventId
public Event.ID getEventId()
Description copied from class:EventGet the type (kind) if this Event- Specified by:
getEventIdin classEvent- Returns:
- the ID of this Event
-
-