Package org.yaml.snakeyaml.events
Class DocumentStartEvent
java.lang.Object
org.yaml.snakeyaml.events.Event
org.yaml.snakeyaml.events.DocumentStartEvent
Marks the beginning of a document.
This event followed by the document's content and a DocumentEndEvent
.
-
Nested Class Summary
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDocumentStartEvent
(Mark startMark, Mark endMark, boolean explicit, DumperOptions.Version version, Map<String, String> tags) Create -
Method Summary
Modifier and TypeMethodDescriptionGet the type (kind) if this Eventboolean
gettergetTags()
Tag shorthands as defined by the%TAG
directive.YAML version the document conforms to.Methods inherited from class org.yaml.snakeyaml.events.Event
equals, getArguments, getEndMark, getStartMark, hashCode, is, toString
-
Field Details
-
explicit
private final boolean explicit -
version
-
tags
-
-
Constructor Details
-
DocumentStartEvent
public DocumentStartEvent(Mark startMark, Mark endMark, boolean explicit, DumperOptions.Version version, Map<String, String> tags) Create- Parameters:
startMark
- - startendMark
- - endexplicit
- - true when it is present in the documentversion
- - YAML versiontags
- - tag directives
-
-
Method Details
-
getExplicit
public boolean getExplicit()getter- Returns:
- true when document end is present
-
getVersion
YAML version the document conforms to.- Returns:
null
if the document has no explicit%YAML
directive. Otherwise an array with two components, the major and minor part of the version (in this order).
-
getTags
Tag shorthands as defined by the%TAG
directive.- Returns:
- Mapping of 'handles' to 'prefixes' (the handles include the '!' characters).
-
getEventId
Description copied from class:Event
Get the type (kind) if this Event- Specified by:
getEventId
in classEvent
- Returns:
- the ID of this Event
-