jfun.parsec.tokens
Class TypedToken<Type>

java.lang.Object
  extended by jfun.parsec.tokens.NamedToken
      extended by jfun.parsec.tokens.TypedToken<Type>
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
TokenDecimal, TokenInteger, TokenReserved, TokenWord

public class TypedToken<Type>
extends NamedToken

Represents a token associated with a token type.

Since:
version 1.1
Author:
Ben Yu Apr 27, 2006 8:01:19 PM
See Also:
Serialized Form

Constructor Summary
TypedToken(java.lang.String name, Type type)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean equals(TypedToken other)
           
 java.lang.String getText()
          Get the text of the token.
 Type getType()
          To get the data type of the token.
 int hashCode()
           
 
Methods inherited from class jfun.parsec.tokens.NamedToken
getName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypedToken

public TypedToken(java.lang.String name,
                  Type type)
Method Detail

getText

public final java.lang.String getText()
Get the text of the token. Equivalent to NamedToken.getName().

Since:
version 0.6

getType

public Type getType()
To get the data type of the token.


equals

public boolean equals(TypedToken other)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class NamedToken

hashCode

public int hashCode()
Overrides:
hashCode in class NamedToken