upidiff.merge
Class LineElement

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

public class LineElement
extends Object

This class represents a listelement that provides information about a line in a text

Author:
Alexander Jung

Field Summary
private  int charInDocument
          Number of chars in the document before this line
private  int charInLinenumberDocument
          Number of chars in the linennumbers document befor this line
private  int charsInLine
          Number of chars in this line
private  int charsInLineofLinenumberDocument
          Number of chars in this line of the linenumbers document
private  Change localChange
          The Changeobjekt that has to be merged in this line
 
Constructor Summary
LineElement()
          This method constructs an emty object of this class
LineElement(int charsInLine, int charsInDocument, int charsInLineOfLD, int charInDocumentOfLD)
          This methode constructs a new object of this class filled with the parameter
LineElement(int charsInLine, int charsInDocument, int charsInLineOfLD, int charInDocumentOfLD, Change localChange)
          This methode constructs a new object of this clas
 
Method Summary
 void addCharsToLine(int numberOfChars)
          Adds a number of chars to a line
 void deleteCharsFromLine(int numberOfChars)
          Deletes a number of chars from a line
 int getCharInDocument()
          Queries the number of chars included in the document before this line
 int getCharInDocumentOfLD()
          Queries the position of the char in the linenumbers document
 int getCharsInLine()
          Queries the chars included in this line
 int getCharsInLineOfLD()
          Queries the chars included in this line
 Change getLocalChange()
          Queries the change in this line
 void setCharInDocument(int charInDocument)
          Sets the number of chars includet in the document before this line
 void setCharInDocumentOfLD(int charInDocument)
          Sets the number of chars includet in the document before this line
 void setCharsInLine(int charsInLine)
          Sets the number of chars in this line
 void setCharsInLineOfLD(int charsInLine)
          Sets the number of chars in this line of the linedocument
 void setLocalChange(Change localChange)
          Sets the change in this line
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

charsInLine

private int charsInLine
Number of chars in this line

See Also:
getCharsInLine(), setCharsInLine(int)

charInDocument

private int charInDocument
Number of chars in the document before this line

See Also:
getCharInDocument(), setCharInDocument(int)

charsInLineofLinenumberDocument

private int charsInLineofLinenumberDocument
Number of chars in this line of the linenumbers document

See Also:
getCharsInLineOfLD(), setCharsInLineOfLD(int)

charInLinenumberDocument

private int charInLinenumberDocument
Number of chars in the linennumbers document befor this line

See Also:
getCharInDocumentOfLD(), setCharInDocumentOfLD(int)

localChange

private Change localChange
The Changeobjekt that has to be merged in this line

See Also:
getLocalChange(), setLocalChange(Change)
Constructor Detail

LineElement

public LineElement()
This method constructs an emty object of this class


LineElement

public LineElement(int charsInLine,
                   int charsInDocument,
                   int charsInLineOfLD,
                   int charInDocumentOfLD)
This methode constructs a new object of this class filled with the parameter

Parameters:
charsInLine - Chars in this line
charsInDocument - Chars in document before this line
charsInLineOfLD - Chars in this line of linedocument
charInDocumentOfLD - Chars in linedocument berfore this line

LineElement

public LineElement(int charsInLine,
                   int charsInDocument,
                   int charsInLineOfLD,
                   int charInDocumentOfLD,
                   Change localChange)
This methode constructs a new object of this clas

Parameters:
charsInLine - Chars in this line
charsInDocument - Chars in document before this line
localChange - Information about the change in this line
charsInLineOfLD - Chars in this line of linedocument
charInDocumentOfLD - Chars in linedocument berfore this line
Method Detail

getCharsInLine

public int getCharsInLine()
Queries the chars included in this line

Returns:
The chars included in this line

getCharsInLineOfLD

public int getCharsInLineOfLD()
Queries the chars included in this line

Returns:
The chars included in this line

getCharInDocument

public int getCharInDocument()
Queries the number of chars included in the document before this line

Returns:
the number of chars

getCharInDocumentOfLD

public int getCharInDocumentOfLD()
Queries the position of the char in the linenumbers document

Returns:
The position of the char

setCharsInLine

public void setCharsInLine(int charsInLine)
Sets the number of chars in this line

Parameters:
charsInLine - The number of chars

addCharsToLine

public void addCharsToLine(int numberOfChars)
Adds a number of chars to a line

Parameters:
numberOfChars - The number of chars

deleteCharsFromLine

public void deleteCharsFromLine(int numberOfChars)
Deletes a number of chars from a line

Parameters:
numberOfChars - The number of chars

setCharsInLineOfLD

public void setCharsInLineOfLD(int charsInLine)
Sets the number of chars in this line of the linedocument

Parameters:
charsInLine - The number of chars

setCharInDocument

public void setCharInDocument(int charInDocument)
Sets the number of chars includet in the document before this line

Parameters:
charInDocument - The number of chars

setCharInDocumentOfLD

public void setCharInDocumentOfLD(int charInDocument)
Sets the number of chars includet in the document before this line

Parameters:
charInDocument - The number of chars

getLocalChange

public Change getLocalChange()
Queries the change in this line

Returns:
The change in this line or if there is none it returns NULL

setLocalChange

public void setLocalChange(Change localChange)
Sets the change in this line

Parameters:
localChange - The Change in this line