Class Token

java.lang.Object
org.apache.commons.csv.Token

final class Token extends Object
Internal token representation.

This is used as a contract between the lexer and the parser.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final StringBuilder
    The content buffer, never null.
    private static final int
    Length of the initial token (content-)buffer
    (package private) boolean
     
    (package private) boolean
    Token ready flag: indicates a valid token with content (ready for the parser).
    (package private) Token.Type
    Token type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
     
    Converts the token state to a string to ease debugging.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_CAPACITY

      private static final int DEFAULT_CAPACITY
      Length of the initial token (content-)buffer
      See Also:
    • type

      Token type
    • content

      final StringBuilder content
      The content buffer, never null.
    • isReady

      boolean isReady
      Token ready flag: indicates a valid token with content (ready for the parser).
    • isQuoted

      boolean isQuoted
  • Constructor Details

    • Token

      Token()
  • Method Details

    • reset

      void reset()
    • toString

      public String toString()
      Converts the token state to a string to ease debugging.
      Overrides:
      toString in class Object
      Returns:
      a string helpful for debugging.