Top Description Fields Constructors Methods
org.yaml.snakeyaml.events

public final Class DocumentStartEvent

extends Event
Class Inheritance
Imports
java.util.Map, org.yaml.snakeyaml.DumperOptions.Version, org.yaml.snakeyaml.error.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 Map<String, String>
private final DumperOptions.Version

Constructor Summary

AccessConstructor and Description
public
DocumentStartEvent(Mark
- start
startMark
,
Mark
- end
endMark
,
boolean
- true when it is present in the document
explicit
,
DumperOptions.Version
- YAML version
version
,
Map<String, String>
- tag directives
tags
)

Create

Method Summary

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

Implements abstract org.yaml.snakeyaml.events.Event.getEventId.

Get the type (kind) if this Event
public boolean

Returns:

true when document end is present
getExplicit
()

getter

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 DumperOptions.Version

Returns:

nullif the document has no explicit %YAML directive. Otherwise an array with two components, the major and minor part of the version (in this order).
getVersion
()

YAML version the document conforms to.

Inherited from org.yaml.snakeyaml.events.Event:
equalsgetArgumentsgetEndMarkgetStartMarkhashCodeistoString

Field Detail

explicitback to summary
private final boolean explicit
tagsback to summary
private final Map<String, String> tags
versionback to summary
private final DumperOptions.Version version

Constructor Detail

DocumentStartEventback to summary
public DocumentStartEvent(Mark startMark, Mark endMark, boolean explicit, DumperOptions.Version version, Map<String, String> tags)

Create

Parameters
startMark:Mark

- start

endMark:Mark

- end

explicit:boolean

- true when it is present in the document

version:DumperOptions.Version

- YAML version

tags:Map<String, String>

- tag directives

Method Detail

getEventIdback to summary
public Event.ID getEventId()

Implements abstract org.yaml.snakeyaml.events.Event.getEventId.

Doc from org.yaml.snakeyaml.events.Event.getEventId.

Get the type (kind) if this Event

Returns:Event.ID

the ID of this Event

Annotations
@Override
getExplicitback to summary
public boolean getExplicit()

getter

Returns:boolean

true when document end is present

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).

getVersionback to summary
public DumperOptions.Version getVersion()

YAML version the document conforms to.

Returns:DumperOptions.Version

nullif the document has no explicit %YAML directive. Otherwise an array with two components, the major and minor part of the version (in this order).