All Packages Class Hierarchy This Package Previous Next Index
Class magician.Four11.Token
java.lang.Object
|
+----magician.Four11.Token
- public class Token
- extends Object
The Token class describes the token read by the tokenizer.
Tokens can be of type TOK_WORD, TOK_LT_PAREN, TOK_RT_PAREN or TOK_EOM.
The type and value of the token can be obtained by
calling its type() and value() methods respectively
- See Also:
- Tokenizer
-
Token()
- Constructor for the Token
-
setType(int)
- Sets the type of the token to the specified int constant
-
setValue(String)
- Sets the value of the token
-
type()
-
Returns the type of the token being read
-
value()
-
Returns the value of the token as a String
Token
public Token()
- Constructor for the Token
setType
public void setType(int type)
- Sets the type of the token to the specified int constant
- Parameters:
- type - the int constant describing the field
setValue
public void setValue(String value)
- Sets the value of the token
- Parameters:
- value - sets the value of the token to the specified String
type
public int type()
- Returns the type of the token being read
- Returns:
- an int describing the token type
value
public String value()
- Returns the value of the token as a String
- Returns:
- a String containing the value of the token
All Packages Class Hierarchy This Package Previous Next Index