class Diff.file_data
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) int |
buffered_lines
Number of elements (lines) in this file.
|
(package private) boolean[] |
changed_flag
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.
|
(package private) int |
nondiscarded_lines
Total number of nondiscarded lines.
|
(package private) int[] |
realindexes
Vector mapping virtual line numbers (not counting discarded lines)
to real ones (counting those lines).
|
(package private) int[] |
undiscarded
Vector, like the previous one except that
the elements for discarded lines have been squeezed out.
|
Constructor and Description |
---|
Diff.file_data(java.lang.Object[] data,
java.util.Hashtable<java.lang.Object,java.lang.Integer> h) |
Modifier and Type | Method and Description |
---|---|
(package private) void |
clear()
Allocate changed array for the results of comparison.
|
(package private) void |
discard_confusing_lines(Diff.file_data f)
Discard lines that have no matches in another file.
|
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) 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.
|
(package private) void |
shift_boundaries(Diff.file_data f)
Adjust inserts/deletes of blank lines to join changes
as much as possible.
|
final int buffered_lines
private final int[] equivs
final int[] undiscarded
final int[] realindexes
int nondiscarded_lines
boolean[] changed_flag
Diff.file_data(java.lang.Object[] data, java.util.Hashtable<java.lang.Object,java.lang.Integer> h)
void clear()
int[] equivCount()
void discard_confusing_lines(Diff.file_data 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(Diff.file_data f)
f
- the file being compared againstCopyright © 2013. All Rights Reserved.