Package | Description |
---|---|
com.github.difflib | |
com.github.difflib.patch | |
com.github.difflib.text | |
com.github.difflib.unifieddiff |
This is the new implementation of UnifiedDiff Tools.
|
Modifier and Type | Method and Description |
---|---|
private static java.util.List<java.lang.String> |
UnifiedDiffUtils.getDeltaText(AbstractDelta<java.lang.String> delta)
getDeltaText returns the lines to be added to the Unified Diff text from the Delta parameter.
|
Modifier and Type | Method and Description |
---|---|
private static java.util.List<java.lang.String> |
UnifiedDiffUtils.processDeltas(java.util.List<java.lang.String> origLines,
java.util.List<AbstractDelta<java.lang.String>> deltas,
int contextSize,
boolean newFile)
processDeltas takes a list of Deltas and outputs them together in a single block of
Unified-Diff-format text.
|
Modifier and Type | Class and Description |
---|---|
class |
ChangeDelta<T>
Describes the change-delta between original and revised texts.
|
class |
DeleteDelta<T>
Describes the delete-delta between original and revised texts.
|
class |
EqualDelta<T>
This delta contains equal lines of data.
|
class |
InsertDelta<T>
Describes the add-delta between original and revised texts.
|
Modifier and Type | Field and Description |
---|---|
private java.util.List<AbstractDelta<T>> |
Patch.deltas |
Modifier and Type | Method and Description |
---|---|
abstract AbstractDelta<T> |
AbstractDelta.withChunks(Chunk<T> original,
Chunk<T> revised)
Create a new delta of the actual instance with customized chunk data.
|
AbstractDelta<T> |
ChangeDelta.withChunks(Chunk<T> original,
Chunk<T> revised) |
AbstractDelta<T> |
DeleteDelta.withChunks(Chunk<T> original,
Chunk<T> revised) |
AbstractDelta<T> |
EqualDelta.withChunks(Chunk<T> original,
Chunk<T> revised) |
AbstractDelta<T> |
InsertDelta.withChunks(Chunk<T> original,
Chunk<T> revised) |
Modifier and Type | Method and Description |
---|---|
java.util.List<AbstractDelta<T>> |
Patch.getDeltas()
Get the list of computed deltas
|
Modifier and Type | Method and Description |
---|---|
void |
Patch.addDelta(AbstractDelta<T> delta)
Add the given delta to this patch
|
private int |
Patch.findPositionFuzzy(Patch.PatchApplyingContext<T> ctx,
AbstractDelta<T> delta) |
private int |
Patch.findPositionWithFuzz(Patch.PatchApplyingContext<T> ctx,
AbstractDelta<T> delta,
int fuzz) |
private int |
Patch.findPositionWithFuzzAndMoreDelta(Patch.PatchApplyingContext<T> ctx,
AbstractDelta<T> delta,
int fuzz,
int moreDelta) |
void |
ConflictOutput.processConflict(VerifyChunk verifyChunk,
AbstractDelta<T> delta,
java.util.List<T> result) |
Modifier and Type | Method and Description |
---|---|
private java.util.List<AbstractDelta<java.lang.String>> |
DiffRowGenerator.decompressDeltas(AbstractDelta<java.lang.String> delta)
Decompresses ChangeDeltas with different source and target size to a
ChangeDelta with same size and a following InsertDelta or DeleteDelta.
|
Modifier and Type | Method and Description |
---|---|
private java.util.List<AbstractDelta<java.lang.String>> |
DiffRowGenerator.decompressDeltas(AbstractDelta<java.lang.String> delta)
Decompresses ChangeDeltas with different source and target size to a
ChangeDelta with same size and a following InsertDelta or DeleteDelta.
|
private java.util.List<DiffRow> |
DiffRowGenerator.generateInlineDiffs(AbstractDelta<java.lang.String> delta)
Add the inline diffs for given delta
|
private int |
DiffRowGenerator.transformDeltaIntoDiffRow(java.util.List<java.lang.String> original,
int endPos,
java.util.List<DiffRow> diffRows,
AbstractDelta<java.lang.String> delta)
Transforms one patch delta into a DiffRow object.
|
Modifier and Type | Method and Description |
---|---|
private static void |
UnifiedDiffWriter.getDeltaText(java.util.function.Consumer<java.lang.String> writer,
AbstractDelta<java.lang.String> delta)
getDeltaText returns the lines to be added to the Unified Diff text from the Delta parameter.
|
Modifier and Type | Method and Description |
---|---|
private static void |
UnifiedDiffWriter.processDeltas(java.util.function.Consumer<java.lang.String> writer,
java.util.List<java.lang.String> origLines,
java.util.List<AbstractDelta<java.lang.String>> deltas,
int contextSize,
boolean newFile) |