|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ie.tomallen.utils.Diff
Diff replicates the GNU diff command. Takes in two arrays of strings and output the to s string the same of output from the diff command without using files.
Nested Class Summary | |
static class |
Diff.change
The result of comparison is an "edit script": a chain of change objects. |
Field Summary | |
boolean |
heuristic
When set to true, the comparison uses a heuristic to speed it up. |
protected ie.tomallen.utils.Diff.UnaryPredicate |
ignore
Set to ignore certain kinds of lines when printing an edit script. |
boolean |
no_discards
When set to true, the algorithm returns a guarranteed minimal set of changes. |
Constructor Summary | |
Diff(java.lang.Object[] a,
java.lang.Object[] b)
Diff, the object constructor. |
|
Diff(java.lang.String strA,
java.lang.String strB)
Diff, String constructor. |
Method Summary | |
Diff.change |
diff_2()
Report the differences of two files. |
java.lang.String |
print_script(Diff.change script)
print_script, Implementation Divide SCRIPT into pieces by calling HUNKFUN and print each piece with PRINTFUN. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean heuristic
public boolean no_discards
protected ie.tomallen.utils.Diff.UnaryPredicate ignore
Constructor Detail |
public Diff(java.lang.Object[] a, java.lang.Object[] b)
equals
. The original Object arrays
are no longer needed for computing the differences. They will
be needed again later to print the results of the comparison as
an edit script, if desired.
a
- Array of object to be compared against bb
- Array of object to be compared against apublic Diff(java.lang.String strA, java.lang.String strB)
equals
. The original Object arrays
are no longer needed for computing the differences. They will
be needed again later to print the results of the comparison as
an edit script, if desired.
strA
- String to be compared against bstrB
- String to be compared against aMethod Detail |
public Diff.change diff_2()
public java.lang.String print_script(Diff.change script)
script
- Diff.change
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |