org.norecess.citkit.tir
Class Position

java.lang.Object
  extended by org.norecess.citkit.tir.Position
All Implemented Interfaces:
IPosition

public class Position
extends java.lang.Object
implements IPosition

An abstraction of the position in a source-code file. So far, a position is only a line number.

Author:
Jeremy D. Frens

Constructor Summary
Position(int line)
          Constructs a position.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getLine()
          Returns the line number of the position.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Position

public Position(int line)
Constructs a position.

Parameters:
line - the position in the source code (probably a line number).
Method Detail

getLine

public int getLine()
Description copied from interface: IPosition
Returns the line number of the position.

Specified by:
getLine in interface IPosition
Returns:
the line number of the position.

hashCode

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

equals

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

toString

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