Top Description Fields Constructors Methods
org.snakeyaml.engine.v2.events

public final Class DocumentStartEvent

extends Event
Class Inheritance
Imports
java.util.Map, .Objects, .Optional, org.snakeyaml.engine.v2.common.SpecVersion, org.snakeyaml.engine.v2.exceptions.Mark

Marks the beginning of a document.

This event followed by the document's content and a DocumentEndEvent.

Field Summary

Modifier and TypeField and Description
private final boolean
private final Optional<SpecVersion>
private final Map<String, String>

Constructor Summary

AccessConstructor and Description
public
DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags, Optional<Mark> startMark, Optional<Mark> endMark)

public
DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags)

Method Summary

Modifier and TypeMethod and Description
public Event.ID
getEventId()

Implements abstract org.snakeyaml.engine.v2.events.Event.getEventId.

Get the type (kind) if this Event

public Optional<SpecVersion>

Returns:

YAML version the document conforms to.
getSpecVersion
()

public Map<String, String>

Returns:

Mapping of 'handles' to 'prefixes' (the handles include the '!' characters).
getTags
()

Tag shorthands as defined by the %TAG directive.

public boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.snakeyaml.engine.v2.events.Event:
getEndMarkgetStartMark

Field Detail

explicitback to summary
private final boolean explicit
specVersionback to summary
private final Optional<SpecVersion> specVersion
tagsback to summary
private final Map<String, String> tags

Constructor Detail

DocumentStartEventback to summary
public DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags, Optional<Mark> startMark, Optional<Mark> endMark)
DocumentStartEventback to summary
public DocumentStartEvent(boolean explicit, Optional<SpecVersion> specVersion, Map<String, String> tags)

Method Detail

getEventIdback to summary
public Event.ID getEventId()

Implements abstract org.snakeyaml.engine.v2.events.Event.getEventId.

Doc from org.snakeyaml.engine.v2.events.Event.getEventId.

Get the type (kind) if this Event

Annotations
@Override
getSpecVersionback to summary
public Optional<SpecVersion> getSpecVersion()
Returns:Optional<SpecVersion>

YAML version the document conforms to.

getTagsback to summary
public Map<String, String> getTags()

Tag shorthands as defined by the %TAG directive.

Returns:Map<String, String>

Mapping of 'handles' to 'prefixes' (the handles include the '!' characters).

isExplicitback to summary
public boolean isExplicit()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override