public interface Scanner extends Iterator<org.snakeyaml.engine.v2.tokens.Token>
Tokens.
The scanner and the parser form together the 'Parse' step in the loading process.
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkToken(org.snakeyaml.engine.v2.tokens.Token.ID... choices)
Check if the next token is one of the given types.
|
org.snakeyaml.engine.v2.tokens.Token |
next()
Returns the next token.
|
org.snakeyaml.engine.v2.tokens.Token |
peekToken()
Return the next token, but do not delete it from the stream.
|
forEachRemaining, hasNext, removeboolean checkToken(org.snakeyaml.engine.v2.tokens.Token.ID... choices)
choices - token IDs to match withtrue if the next token is one of the given types. Returns
false if no more tokens are available.ScannerException - Thrown in case of malformed input.org.snakeyaml.engine.v2.tokens.Token peekToken()
next()ScannerException - Thrown in case of malformed input.IndexOutOfBoundsException - if no more token leftorg.snakeyaml.engine.v2.tokens.Token next()
The token will be removed from the stream. (Every invocation of this method must happen after
calling either checkToken(org.snakeyaml.engine.v2.tokens.Token.ID...) or peekToken()
next in interface Iterator<org.snakeyaml.engine.v2.tokens.Token>ScannerException - Thrown in case of malformed input.IndexOutOfBoundsException - if no more token leftCopyright © 2018–2022. All rights reserved.