public class Token
extends java.lang.Object
| Constructor and Description |
|---|
Token(java.lang.String text,
TokenType tokenType)
Initializes a new instance of the
Token class. |
Token(java.lang.String text,
TokenType tokenType,
int index)
Initializes a new instance of the
Token class. |
Token(Token prototype)
Initializes a new instance of the
Token class. |
| Modifier and Type | Method and Description |
|---|---|
int |
getIndex()
Gets the index of this token in the input string.
|
int |
getLength()
Gets the length of this token.
|
java.lang.String |
getText()
Gets the token text.
|
TokenType |
getType()
Gets the token type.
|
int |
hashCode() |
void |
setIndex(int value)
Sets the index of this token in the input string.
|
void |
setText(java.lang.String value)
Sets the token text.
|
java.lang.String |
toString() |
public Token(java.lang.String text,
TokenType tokenType)
Token class.public Token(java.lang.String text,
TokenType tokenType,
int index)
Token class.public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getText()
public void setText(java.lang.String value)
public TokenType getType()
public int getIndex()
public void setIndex(int value)
public int getLength()