upidiff.merge
Class CharOffset

java.lang.Object
  |
  +--upidiff.merge.CharOffset

public class CharOffset
extends Object

This class represents an offset to locate a position of a char in a text

Author:
Alexander Jung

Field Summary
private  int lineNumber
          Position of the line in the text
private  int positionInLine
          Position of the char in the line
 
Constructor Summary
CharOffset(int lineNumber, int positionInLine)
          constructs a new CharOffset object
 
Method Summary
 int getLineNumber()
          Queries the number of the line that includes the char
 int getPositionInLine()
          Queries the position of the char in the line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lineNumber

private int lineNumber
Position of the line in the text

See Also:
getLineNumber()

positionInLine

private int positionInLine
Position of the char in the line

See Also:
getPositionInLine()
Constructor Detail

CharOffset

public CharOffset(int lineNumber,
                  int positionInLine)
constructs a new CharOffset object

Parameters:
lineNumber - sets the position of the line in the text that includes the char
positionInLine - sets the position of the char in the line
Method Detail

getLineNumber

public int getLineNumber()
Queries the number of the line that includes the char

Returns:
The postition of the line

getPositionInLine

public int getPositionInLine()
Queries the position of the char in the line

Returns:
positonInLine