Class SNBTTokenizer.Token

java.lang.Object
de.pauleff.formats.snbt.SNBTTokenizer.Token
Enclosing class:
SNBTTokenizer

public static class SNBTTokenizer.Token extends Object
Represents a single token in the SNBT input.
  • Constructor Details

    • Token

      public Token(SNBTTokenizer.TokenType type, String value, int position)
      Creates a new token.
      Parameters:
      type - the token type
      value - the token value
      position - the position in the input where this token starts
  • Method Details

    • getType

      public SNBTTokenizer.TokenType getType()
      Returns the type of this token.
      Returns:
      the token type
    • getValue

      public String getValue()
      Returns the string value of this token.
      Returns:
      the token value
    • getPosition

      public int getPosition()
      Returns the position where this token starts in the input.
      Returns:
      the starting position
    • toString

      public String toString()
      Overrides:
      toString in class Object