Top Description Methods
org.yaml.snakeyaml.parser

public Interface Parser

Known Direct Implementers
org.yaml.snakeyaml.parser.ParserImpl
Imports
org.yaml.snakeyaml.events.Event

This interface represents an input stream of Events.

The parser and the scanner form together the 'Parse' step in the loading process (see chapter 3.1 of the YAML Specification).

See Also
org.yaml.snakeyaml.events.Event

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the next event can be assigned to a variable of the given type. Returns false if no more events are available.
checkEvent
(Event.ID
Event ID.
choice
)

Check if the next event is one of the given type.

public Event

Returns:

the next parsed event
getEvent
()

Returns the next event.

public Event

Returns:

The event that will be returned on the next call to getEvent
peekEvent
()

Return the next event, but do not delete it from the stream.

Method Detail

checkEventback to summary
public boolean checkEvent(Event.ID choice)

Check if the next event is one of the given type.

Parameters
choice:Event.ID

Event ID.

Returns:boolean

true if the next event can be assigned to a variable of the given type. Returns false if no more events are available.

Exceptions
ParserException:
Thrown in case of malformed input.
getEventback to summary
public Event getEvent()

Returns the next event.

The event will be removed from the stream.

Returns:Event

the next parsed event

Exceptions
ParserException:
Thrown in case of malformed input.
peekEventback to summary
public Event peekEvent()

Return the next event, but do not delete it from the stream.

Returns:Event

The event that will be returned on the next call to getEvent

Exceptions
ParserException:
Thrown in case of malformed input.