|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--JLibDiff.FileData
Title: $FileName: FileData.java$
Field Summary | |
private boolean[] |
changedFlags
Array, indexed by real origin-1 line number, containing true for a line that is an insertion or a deletion. |
private int[] |
equivs
Vector, indexed by line number, containing an equivalence code for each line. |
private DiffMaker |
maker
|
private int |
numLinesInBuffer
Number of elements (lines) in this file. |
private int |
numLinesNotDiscarded
Total number of nondiscarded lines. |
private int[] |
realindexes
Vector mapping virtual line numbers (not counting discarded lines) to real ones (counting those lines). |
private int[] |
undiscarded
Vector, like the previous one except that the elements for discarded lines have been squeezed out. |
Constructor Summary | |
FileData(java.lang.Object[] data,
java.util.Hashtable h,
DiffMaker maker)
|
Method Summary | |
(package private) void |
clear()
Allocate changed array for the results of comparison. |
private void |
discard(byte[] discards)
Actually discard the lines. |
private byte[] |
discardable(int[] counts)
Mark to be discarded each line that matches no line of another file. |
(package private) void |
discardConfusingLines(FileData f)
Discard lines that have no matches in another file. |
(package private) int[] |
equivCount()
Return equiv_count[I] as the number of lines in this file that fall in equivalence class I. |
private void |
filterDiscards(byte[] discards)
Don't really discard the provisional lines except when they occur in a run of discardables, with nonprovisionals at the beginning and end. |
boolean[] |
getChangedFlags()
Returns the changedFlags. |
int |
getNumLinesInBuffer()
Returns the numLinesInBuffer. |
int |
getNumLinesNotDiscarded()
Returns the numLinesNotDiscarded. |
int[] |
getRealindexes()
Returns the realindexes. |
int[] |
getUndiscarded()
Returns the undiscarded. |
(package private) void |
shift_boundaries(FileData f)
Adjust inserts/deletes of blank lines to join changes as much as possible. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int numLinesInBuffer
private int[] equivs
private int[] undiscarded
private int[] realindexes
private int numLinesNotDiscarded
private boolean[] changedFlags
private DiffMaker maker
Constructor Detail |
public FileData(java.lang.Object[] data, java.util.Hashtable h, DiffMaker maker)
Method Detail |
void clear()
int[] equivCount()
void discardConfusingLines(FileData f)
When we discard a line, we also mark it as a deletion or insertion so that it will be printed in the output.
f
- the other fileprivate byte[] discardable(int[] counts)
counts
- The count of each equivalence number for the other file.
equivCount()
private void filterDiscards(byte[] discards)
private void discard(byte[] discards)
discards
- flags lines to be discardedvoid shift_boundaries(FileData f)
f
- the file being compared againstpublic int[] getUndiscarded()
public int getNumLinesNotDiscarded()
public boolean[] getChangedFlags()
public int[] getRealindexes()
public int getNumLinesInBuffer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |