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 |
---|---|
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> original,
java.util.List<T> revised) |
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> source,
java.util.List<T> target,
java.util.function.BiPredicate<T,T> equalizer)
Computes the difference between the original and revised list of elements
with default diff algorithm
|
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> original,
java.util.List<T> revised,
boolean includeEqualParts) |
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> original,
java.util.List<T> revised,
DiffAlgorithmI<T> algorithm)
Computes the difference between the original and revised list of elements
with default diff algorithm
|
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> original,
java.util.List<T> revised,
DiffAlgorithmI<T> algorithm,
DiffAlgorithmListener progress) |
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> original,
java.util.List<T> revised,
DiffAlgorithmI<T> algorithm,
DiffAlgorithmListener progress,
boolean includeEqualParts)
Computes the difference between the original and revised list of elements
with default diff algorithm
|
static <T> Patch<T> |
DiffUtils.diff(java.util.List<T> original,
java.util.List<T> revised,
DiffAlgorithmListener progress)
Computes the difference between the original and revised list of elements
with default diff algorithm
|
static Patch<java.lang.String> |
DiffUtils.diff(java.lang.String sourceText,
java.lang.String targetText,
DiffAlgorithmListener progress)
Computes the difference between the original and revised text.
|
static Patch<java.lang.String> |
DiffUtils.diffInline(java.lang.String original,
java.lang.String revised)
Computes the difference between the given texts inline.
|
static Patch<java.lang.String> |
UnifiedDiffUtils.parseUnifiedDiff(java.util.List<java.lang.String> diff)
Parse the given text in unified format and creates the list of deltas for it.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.String> |
UnifiedDiffUtils.generateUnifiedDiff(java.lang.String originalFileName,
java.lang.String revisedFileName,
java.util.List<java.lang.String> originalLines,
Patch<java.lang.String> patch,
int contextSize)
generateUnifiedDiff takes a Patch and some other arguments, returning the Unified Diff format
text representing the Patch.
|
static <T> java.util.List<T> |
DiffUtils.patch(java.util.List<T> original,
Patch<T> patch)
Patch the original text with given patch
|
private static void |
UnifiedDiffUtils.processLinesInPrevChunk(java.util.List<java.lang.String[]> rawChunk,
Patch<java.lang.String> patch,
int old_ln,
int new_ln) |
static <T> java.util.List<T> |
DiffUtils.unpatch(java.util.List<T> revised,
Patch<T> patch)
Unpatch the revised text for a given patch
|
Modifier and Type | Method and Description |
---|---|
static <T> Patch<T> |
Patch.generate(java.util.List<T> original,
java.util.List<T> revised,
java.util.List<Change> changes) |
static <T> Patch<T> |
Patch.generate(java.util.List<T> original,
java.util.List<T> revised,
java.util.List<Change> _changes,
boolean includeEquals) |
Patch |
Patch.withConflictOutput(ConflictOutput<T> conflictOutput)
Alter normal conflict output behaviour to e.g.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<DiffRow> |
DiffRowGenerator.generateDiffRows(java.util.List<java.lang.String> original,
Patch<java.lang.String> patch)
Generates the DiffRows describing the difference between original and
revised texts using the given patch.
|
Modifier and Type | Field and Description |
---|---|
private Patch<java.lang.String> |
UnifiedDiffFile.patch |
Modifier and Type | Method and Description |
---|---|
Patch<java.lang.String> |
UnifiedDiffFile.getPatch() |
Modifier and Type | Method and Description |
---|---|
static UnifiedDiffFile |
UnifiedDiffFile.from(java.lang.String fromFile,
java.lang.String toFile,
Patch<java.lang.String> patch) |