org.jcoderz.phoenix.sqlparser
Class Token

java.lang.Object
  extended by org.jcoderz.phoenix.sqlparser.Token

public final class Token
extends Object

The token class hold a token type and the corresponding value.

Author:
Michael Griffel

Constructor Summary
Token(TokenType type)
          Constructor for token w/o a value.
Token(TokenType type, String value)
          Constructor for token w/ value.
 
Method Summary
 TokenType getType()
          Returns the token type of this token.
 String getValue()
          Returns the value of this token.
 String toString()
          Returns the string representation of this token.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Token

public Token(TokenType type)
Constructor for token w/o a value.

Parameters:
type - token type.

Token

public Token(TokenType type,
             String value)
Constructor for token w/ value.

Parameters:
type - the token type.
value - the token value.
Method Detail

getType

public TokenType getType()
Returns the token type of this token.

Returns:
the token type of this token.

getValue

public String getValue()
Returns the value of this token.

Returns:
the value of this token.

toString

public String toString()
Returns the string representation of this token.

Overrides:
toString in class Object
Returns:
the string representation of this token.


Copyright 2007 The jCoderZ Project.