public final class ScannerImpl extends Object implements Scanner
Scanner produces tokens of the following types: STREAM-START STREAM-END COMMENT DIRECTIVE(name, value) DOCUMENT-START DOCUMENT-END BLOCK-SEQUENCE-START BLOCK-MAPPING-START BLOCK-END FLOW-SEQUENCE-START FLOW-MAPPING-START FLOW-SEQUENCE-END FLOW-MAPPING-END BLOCK-ENTRY FLOW-ENTRY KEY VALUE ALIAS(value) ANCHOR(value) TAG(value) SCALAR(value, plain, style) Read comments in the Scanner code for more details.
| Constructor and Description |
|---|
ScannerImpl(LoadSettings settings,
StreamReader reader)
Create
|
ScannerImpl(StreamReader reader)
Deprecated.
it should be used with LoadSettings
|
ScannerImpl(StreamReader reader,
LoadSettings settings)
Deprecated.
use the other constructor with LoadSettings first
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkToken(org.snakeyaml.engine.v2.tokens.Token.ID... choices)
Check whether the next token is one of the given types.
|
boolean |
hasNext() |
org.snakeyaml.engine.v2.tokens.Token |
next()
Return the next token, removing it from the queue.
|
org.snakeyaml.engine.v2.tokens.Token |
peekToken()
Return the next token, but do not delete it from the queue.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, remove@Deprecated public ScannerImpl(StreamReader reader, LoadSettings settings)
reader - - the inputsettings - - configurable optionspublic ScannerImpl(LoadSettings settings, StreamReader reader)
settings - - configurable optionsreader - - the input@Deprecated public ScannerImpl(StreamReader reader)
reader - - the inputpublic boolean checkToken(org.snakeyaml.engine.v2.tokens.Token.ID... choices)
checkToken in interface Scannerchoices - token IDs to match withtrue if the next token is one of the given types. Returns
false if no more tokens are available.public org.snakeyaml.engine.v2.tokens.Token peekToken()
peekToken in interface ScannerScanner.next()public boolean hasNext()
Copyright © 2018–2022. All rights reserved.