|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--upidiff.diff.FileChange
This class represents the changes determined for two input texts.
| Field Summary | |
private Change |
head
Pointer to the first change in the list. |
private InputBuffer |
newText
Input text of the new file. |
private InputBuffer |
oldText
Input text of the old file. |
private Change |
tail
Pointer to the last change in the list. |
| Constructor Summary | |
FileChange(InputBuffer oldText,
InputBuffer newText)
Creates a new FileChange object. |
|
| Method Summary | |
boolean |
allChangesMerged()
Checks if there a still not-merged changes in the list. |
int |
blockChangeCount()
|
void |
calculate(boolean displayLineChanges,
boolean displayCharChanges)
Calculates the differences between the two given file contents. |
Change |
getHead()
Returns the head of the changes list. |
InputBuffer |
getNewText()
Returns the content of the new file. |
Change |
getNextNotMerged(Change current)
Returns the next change that is not merged or null. |
InputBuffer |
getOldText()
Returns the content of the old file. |
Change |
getPrevNotMerged(Change current)
Returns the previous change that is not merged or null. |
Change |
getTail()
Returns the tail of the changes list. |
void |
recalculate(int oldTextLine,
int newTextLine)
Recalculates the differences using a fixed line association. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Change head
getHead()private Change tail
getTail()private InputBuffer oldText
getOldText()private InputBuffer newText
getNewText()| Constructor Detail |
public FileChange(InputBuffer oldText,
InputBuffer newText)
oldText - Input buffer with the content of the old file.newText - Input buffer with the content of the new file.| Method Detail |
public final Change getHead()
public final Change getTail()
public final int blockChangeCount()
public final InputBuffer getOldText()
public final InputBuffer getNewText()
public final void calculate(boolean displayLineChanges,
boolean displayCharChanges)
displayLineChanges - Whether or not to display line changes
by default.displayCharChanges - Whether or not to display char changes
by default. This has no effect if
displayLineChanges is
false.
public final void recalculate(int oldTextLine,
int newTextLine)
oldTextLine - Line offset of the old text.newTextLine - Line offset of the new text.public final boolean allChangesMerged()
public final Change getNextNotMerged(Change current)
current - Current change.
public final Change getPrevNotMerged(Change current)
current - Current change.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||