Class TokenBuffer

java.lang.Object
com.yahoo.document.json.TokenBuffer

public class TokenBuffer extends Object
Helper class to enable lookahead in the token stream.
Author:
Steinar Knutsen
  • Constructor Details

  • 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

      public String currentName()
      Returns the current token name without changing position, or null if none
    • currentText

      public String 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

      public TokenBuffer.Token prefetchScalar(String name)
    • skipToRelativeNesting

      public void skipToRelativeNesting(int relativeNesting)
    • rest

      public List<TokenBuffer.Token> rest()