slogo.parser.token
Class EOFToken

java.lang.Object
  extended by slogo.parser.token.EOFToken
All Implemented Interfaces:
Token

public class EOFToken
extends java.lang.Object
implements Token

This represents an end-of-file token Uses the singleton pattern since there's no reason to have more than one such token. For equals This compares false to any object other than an EOFToken

Author:
Owen Astrachan

Field Summary
private static EOFToken ourInstance
           
 
Constructor Summary
private EOFToken()
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
static EOFToken getInstance()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ourInstance

private static EOFToken ourInstance
Constructor Detail

EOFToken

private EOFToken()
Method Detail

getInstance

public static EOFToken getInstance()
Returns:
an EOFToken (singleton)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object
Returns:
true of o is an EOFToken, else return false

toString

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