xtc.tree
Class Location

java.lang.Object
  extended by xtc.tree.Location
All Implemented Interfaces:
java.lang.Comparable

public class Location
extends java.lang.Object
implements java.lang.Comparable

The location in a source file.

Version:
$Revision: 1.12 $
Author:
Robert Grimm

Field Summary
 int column
          The column.
 java.lang.String file
          The file name.
 int line
          The line number.
 
Constructor Summary
Location(java.lang.String file, int line, int column)
          Create a new location.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 int hashCode()
           
 java.lang.String toString()
           
 void write(java.lang.Appendable out)
          Write this location to the specified appenable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

file

public final java.lang.String file
The file name.


line

public final int line
The line number.


column

public final int column
The column.

Constructor Detail

Location

public Location(java.lang.String file,
                int line,
                int column)
Create a new location.

Parameters:
file - The file name.
line - The line number.
column - The column.
Method Detail

hashCode

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

equals

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

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

write

public void write(java.lang.Appendable out)
           throws java.io.IOException
Write this location to the specified appenable.

Parameters:
out - The appendable.
Throws:
java.io.IOException - Signals an I/O error.

toString

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


Copyright © 2012. All Rights Reserved.