|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscanner.Token
public class Token
Tokens are objects created by a scanner while scanning a stream of characters.
| Constructor Summary | |
|---|---|
Token(java.lang.String val,
TokenType type,
CharStreamPosition position)
Creates a new token with the specified values. |
|
| Method Summary | |
|---|---|
int |
getLength()
Returns the length of this positionable object. |
CharStreamPosition |
getPosition()
Returns the position of this token. |
TokenType |
getType()
Returns the type of this token. |
java.lang.String |
getValue()
Returns the string of this token. |
java.lang.String |
toString()
Returns a string representation of this token. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Token(java.lang.String val,
TokenType type,
CharStreamPosition position)
val - The token value.type - The type of this tokenposition - The position of this token : equals to the position
of the first character of this token.| Method Detail |
|---|
public TokenType getType()
public java.lang.String getValue()
public int getLength()
PositionableInCharStream
getLength in interface PositionableInCharStreampublic CharStreamPosition getPosition()
getPosition in interface PositionableInCharStreampublic java.lang.String toString()
toString in class java.lang.Object
|
abc4j API Specification | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||