Top Description Methods
org.snakeyaml.engine.v2.parser

public Interface Parser

extends Iterator<Event>
Known Direct Implementers
org.snakeyaml.engine.v2.parser.ParserImpl
Imports
java.util.Iterator, .NoSuchElementException, org.snakeyaml.engine.v2.events.Event, org.snakeyaml.engine.v2.exceptions.ParserException

This interface represents an input stream of Events.

The parser and the scanner form together the 'Parse' step in the loading process.

See Also
Figure 3.1. Processing Overview

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the next event has the given ID, false otherwise.
checkEvent
(Event.ID
Event ID to match
choice
)

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

public Event

Returns:

the next parsed event
next
()

Redeclares java.util.Iterator.next.

Returns the next event.

public Event

Returns:

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

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

Inherited from java.util.Iterator:
forEachRemaininghasNextremove

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 to match

Returns:boolean

true if the next event has the given ID, false otherwise.

Exceptions
ParserException:
in case of malformed input.
NoSuchElementException:
in case no next event is available.
nextback to summary
public Event next()

Redeclares java.util.Iterator.next.

Returns the next event.

The event will be removed from the stream.

Returns:Event

the next parsed event

Exceptions
ParserException:
in case of malformed input.
NoSuchElementException:
in case no next event is available.
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 next

Exceptions
ParserException:
in case of malformed input
NoSuchElementException:
in case no next event is available.