com.adamcornett.cminus
Class TokenLocation

java.lang.Object
  extended by com.adamcornett.cminus.TokenLocation
All Implemented Interfaces:
Comparable<TokenLocation>

public class TokenLocation
extends Object
implements Comparable<TokenLocation>

Represents a token's location in a source file.

Author:
Adam Cornett

Field Summary
private  Integer charPos
           
private  Integer line
           
 
Constructor Summary
TokenLocation(int l, int c)
           
TokenLocation(org.antlr.runtime.Token t)
           
 
Method Summary
 int compareTo(TokenLocation o)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

charPos

private final Integer charPos

line

private final Integer line
Constructor Detail

TokenLocation

public TokenLocation(int l,
                     int c)

TokenLocation

public TokenLocation(org.antlr.runtime.Token t)
Method Detail

compareTo

public int compareTo(TokenLocation o)
Specified by:
compareTo in interface Comparable<TokenLocation>

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object