Top Description Inners Fields Constructors Methods
org.apache.commons.csv

pack-priv final Class Token

extends Object
Class Inheritance
Static Imports
org.apache.commons.csv.Token.Type.INVALID

Internal token representation.

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
pack-priv final StringBuilder
content

The content buffer, never null.

private static final int
DEFAULT_CAPACITY

Length of the initial token (content-)buffer

pack-priv boolean
pack-priv boolean
isReady

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

pack-priv Token.Type
type

Token type

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public String

Returns:

a string helpful for debugging.
toString
()

Overrides java.lang.Object.toString.

Converts the token state to a string to ease debugging.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

contentback to summary
pack-priv final StringBuilder content

The content buffer, never null.

DEFAULT_CAPACITYback to summary
private static final int DEFAULT_CAPACITY

Length of the initial token (content-)buffer

isQuotedback to summary
pack-priv boolean isQuoted
isReadyback to summary
pack-priv boolean isReady

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

typeback to summary
pack-priv Token.Type type

Token type

Constructor Detail

Tokenback to summary
pack-priv Token()

Method Detail

resetback to summary
pack-priv void reset()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Converts the token state to a string to ease debugging.

Returns:String

a string helpful for debugging.

Annotations
@Override
org.apache.commons.csv back to summary

pack-priv final Enum Token.Type

extends Enum<Token.Type>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final Token.Type
COMMENT

Token is a comment line.

public static final Token.Type
EOF

Token (which can have content) when the end of file is reached.

public static final Token.Type
EORECORD

Token with content when the end of a line is reached.

public static final Token.Type
INVALID

Token has no valid content, that is, is in its initialized state.

public static final Token.Type
TOKEN

Token with content, at the beginning or in the middle of a line.

Constructor Summary

AccessConstructor and Description
private
Type()

Method Summary

Modifier and TypeMethod and Description
public static Token.Type
public static Token.Type[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

COMMENTback to summary
public static final Token.Type COMMENT

Token is a comment line.

EOFback to summary
public static final Token.Type EOF

Token (which can have content) when the end of file is reached.

EORECORDback to summary
public static final Token.Type EORECORD

Token with content when the end of a line is reached.

INVALIDback to summary
public static final Token.Type INVALID

Token has no valid content, that is, is in its initialized state.

TOKENback to summary
public static final Token.Type TOKEN

Token with content, at the beginning or in the middle of a line.

Constructor Detail

Typeback to summary
private Type()

Method Detail

valueOfback to summary
public static Token.Type valueOf(String name)
valuesback to summary
public static Token.Type[] values()