Interface Parser
- All Known Implementing Classes:
ParserImpl
-
Method Summary
Methods inherited from interface Iterator
forEachRemaining, hasNext, remove
-
Method Details
-
checkEvent
Check if the next event is one of the given type.- Parameters:
choice- Event ID to match- Returns:
trueif the next event has the given ID. Returnsfalseif 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 or NoSuchElementException in case no event is available.
-
next
Event next()Returns the next event.The event will be removed from the stream.
- Specified by:
nextin interfaceIterator<Event>- Returns:
- the next parsed event
- Throws:
ParserException- Thrown in case of malformed input.
-