java.lang.Object
org.yaml.snakeyaml.events.Event
org.yaml.snakeyaml.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.
-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description DocumentStartEvent(Mark startMark, Mark endMark, boolean explicit, DumperOptions.Version version, java.util.Map<java.lang.String,java.lang.String> tags) -
Method Summary
Modifier and Type Method Description Event.IDgetEventId()Get the type (kind) if this EventbooleangetExplicit()java.util.Map<java.lang.String,java.lang.String>getTags()Tag shorthands as defined by the%TAGdirective.DumperOptions.VersiongetVersion()YAML version the document conforms to.Methods inherited from class org.yaml.snakeyaml.events.Event
equals, getArguments, getEndMark, getStartMark, hashCode, is, toString
-
Constructor Details
-
DocumentStartEvent
public DocumentStartEvent(Mark startMark, Mark endMark, boolean explicit, DumperOptions.Version version, java.util.Map<java.lang.String,java.lang.String> tags)
-
-
Method Details
-
getExplicit
public boolean getExplicit() -
getVersion
YAML version the document conforms to.- Returns:
nullif the document has no explicit%YAMLdirective. Otherwise an array with two components, the major and minor part of the version (in this order).
-
getTags
public java.util.Map<java.lang.String,java.lang.String> getTags()Tag shorthands as defined by the%TAGdirective.- Returns:
- Mapping of 'handles' to 'prefixes' (the handles include the '!' characters).
-
getEventId
Description copied from class:EventGet the type (kind) if this Event- Specified by:
getEventIdin classEvent- Returns:
- the ID of this Event
-