se.chalmers.cs.gf.parse
Class Token
java.lang.Object
se.chalmers.cs.gf.parse.Token
public class Token
- extends java.lang.Object
Constructor Summary |
Token(java.lang.String value)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Token
public Token(java.lang.String value)
getValue
public java.lang.String getValue()
- Get the value of this token. If the token is a word,
the value is the word itself. If the token is a string
literal backslashes and double
quotes in the value are not escaped.
getType
public Token.Type getType()
- Gets the type of this token.
isWord
public boolean isWord()
intValue
public int intValue()
- Get the integer value of this token.
- Throws:
GFException
- If this is not an integer token.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
equals
public boolean equals(Token t)
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object