public class Token
extends java.lang.Object
| Constructor and Description |
|---|
Token(int type,
java.lang.String text,
int startCharPositionInInput)
Constructs a token from the specified token-name and attribute-value
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getStartCharPositionInInput() |
java.lang.String |
getText()
Returns the attribute-value of this token.
|
int |
getType()
Returns the token-name of this token.
|
int |
hashCode() |
java.lang.String |
toString() |
public Token(int type,
java.lang.String text,
int startCharPositionInInput)
type - the token-nametext - the attribute-valuestartCharPositionInInput - the position (starting from 0) at which this token
starts in the input.public java.lang.String getText()
public int getType()
public int getStartCharPositionInInput()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object