Package com.yahoo.document.json
Class TokenBuffer
java.lang.Object
com.yahoo.document.json.TokenBuffer
- Direct Known Subclasses:
LazyTokenBuffer
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.JsonParser parser) 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 thisReturns a sequence of remaining tokens in this, or nulls when none remain.int
nesting()
com.fasterxml.jackson.core.JsonToken
next()
Returns the next token, or null, and updates the nesting count of this.void
skipToRelativeNesting
(int relativeNesting)
-
Constructor Details
-
TokenBuffer
public TokenBuffer()
-
-
Method Details
-
isEmpty
public boolean isEmpty()Returns whether any tokens are available in this -
next
public com.fasterxml.jackson.core.JsonToken next()Returns the next token, or null, and updates the nesting count of this. -
current
public com.fasterxml.jackson.core.JsonToken current()Returns the current token without changing position, 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 -
lookahead
Returns a sequence of remaining tokens in this, or nulls when none remain. This may fill the token buffer, but not otherwise modify it. -
bufferObject
public void bufferObject(com.fasterxml.jackson.core.JsonParser parser) -
nesting
public int nesting() -
skipToRelativeNesting
public void skipToRelativeNesting(int relativeNesting)
-