com.hazelcast.org.snakeyaml.engine.v1.parser

## Interface Parser

- All Superinterfaces:
    Iterator<Event>
  All Known Implementing Classes:
    ParserImpl

      public interface Parser
      extends Iterator<Event>

  This interface represents an input stream of `Events`.

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

  See Also:
    `Event`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkEvent(Event.ID choice)` Check if the next event is one of the given type.
    `Event` | `next()` Returns the next event.
    `Event` | `peekEvent()` Return the next event, but do not delete it from the stream.

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining, hasNext, remove`

- - ### Method Detail

    - #### checkEvent

          boolean checkEvent(Event.ID choice)

      Check if the next event is one of the given type.
      Parameters:
        `choice` - Event ID.
      Returns:
        `true` if the next event can be assigned to a variable of the given type. Returns `false` if no more events are available.
      Throws:
        `ParserException` - Thrown in case of malformed input.

    - #### peekEvent

          Event peekEvent()

      Return the next event, but do not delete it from the stream.
      Returns:
        The event that will be returned on the next call to `next()`
      Throws:
        `ParserException` - Thrown in case of malformed input.

    - #### next

          Event next()

      Returns the next event.

      The event will be removed from the stream.

      Specified by:
        `next` in interface `Iterator<Event>`
      Returns:
        the next parsed event
      Throws:
        `ParserException` - Thrown in case of malformed input.

Copyright © 2019. All rights reserved.