Package com.yahoo.document.json
Class TokenBuffer
java.lang.Object
com.yahoo.document.json.TokenBuffer
Helper class to enable lookahead in the token stream.
- Author:
- Steinar Knutsen
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
bufferObject
(com.fasterxml.jackson.core.JsonToken first, com.fasterxml.jackson.core.JsonParser tokens) com.fasterxml.jackson.core.JsonToken
current()
Returns the current token without changing position, or null if noneReturns the current token name without changing position, or null if noneReturns the current token text without changing position, or null if noneboolean
isEmpty()
Returns whether any tokens are available in thisint
nesting()
com.fasterxml.jackson.core.JsonToken
next()
com.fasterxml.jackson.core.JsonToken
peek
(int ahead) Returns a given number of tokens ahead, or null if noneprefetchScalar
(String name) com.fasterxml.jackson.core.JsonToken
previous()
int
rest()
void
skipToRelativeNesting
(int relativeNesting)
-
Constructor Details
-
TokenBuffer
public TokenBuffer() -
TokenBuffer
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns whether any tokens are available in this -
previous
public com.fasterxml.jackson.core.JsonToken previous() -
current
public com.fasterxml.jackson.core.JsonToken current()Returns the current token without changing position, or null if none -
next
public com.fasterxml.jackson.core.JsonToken next() -
peek
public com.fasterxml.jackson.core.JsonToken peek(int ahead) Returns a given number of tokens ahead, or null if none -
currentName
Returns the current token name without changing position, or null if none -
currentText
Returns the current token text without changing position, or null if none -
remaining
public int remaining() -
bufferObject
public void bufferObject(com.fasterxml.jackson.core.JsonToken first, com.fasterxml.jackson.core.JsonParser tokens) -
nesting
public int nesting() -
prefetchScalar
-
skipToRelativeNesting
public void skipToRelativeNesting(int relativeNesting) -
rest
-