com.wcohen.ss.tokens
Class BasicToken

java.lang.Object
  extended by com.wcohen.ss.tokens.BasicToken
All Implemented Interfaces:
Token, java.lang.Comparable<Token>

public class BasicToken
extends java.lang.Object
implements Token, java.lang.Comparable<Token>

An interned version of a string.


Method Summary
 int compareTo(Token t)
           
 int getIndex()
           
 java.lang.String getValue()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getValue

public java.lang.String getValue()
Specified by:
getValue in interface Token

getIndex

public int getIndex()
Specified by:
getIndex in interface Token

compareTo

public int compareTo(Token t)
Specified by:
compareTo in interface java.lang.Comparable<Token>

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object