public class DiffRowGenerator
extends java.lang.Object
These values are: showInlineDiffs = false; ignoreWhiteSpaces = true; ignoreBlankLines = true; ...
For instantiating the DiffRowGenerator you should use the its builder. Like in example
DiffRowGenerator generator = new DiffRowGenerator.Builder().showInlineDiffs(true).
ignoreWhiteSpaces(true).columnWidth(100).build();
| Modifier and Type | Class and Description |
|---|---|
static class |
DiffRowGenerator.Builder
This class used for building the DiffRowGenerator.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<DiffRow> |
generateDiffRows(java.util.List<java.lang.String> original,
java.util.List<java.lang.String> revised)
Get the DiffRows describing the difference between original and revised texts using the
given patch.
|
<R extends PatchResult<java.lang.String>> |
generateDiffRows(java.util.List<java.lang.String> original,
java.util.List<java.lang.String> revised,
Patch<java.lang.String,R> patch)
Generates the DiffRows describing the difference between original and revised texts using the
given patch.
|
static java.util.LinkedList<java.lang.String> |
wrapInTag(java.util.LinkedList<java.lang.String> sequence,
int startPosition,
int endPosition,
java.lang.String tag,
java.lang.String cssClass)
Wrap the elements in the sequence with the given tag
|
static java.lang.String |
wrapInTag(java.lang.String line,
java.lang.String tag,
java.lang.String cssClass)
Wrap the given line with the given tag
|
public java.util.List<DiffRow> generateDiffRows(java.util.List<java.lang.String> original, java.util.List<java.lang.String> revised)
original - the original textrevised - the revised textpublic <R extends PatchResult<java.lang.String>> java.util.List<DiffRow> generateDiffRows(java.util.List<java.lang.String> original, java.util.List<java.lang.String> revised, Patch<java.lang.String,R> patch)
original - the original textrevised - the revised textpatch - the given patchpublic static java.util.LinkedList<java.lang.String> wrapInTag(java.util.LinkedList<java.lang.String> sequence,
int startPosition,
int endPosition,
java.lang.String tag,
java.lang.String cssClass)
sequence - the sequencestartPosition - the position from which tag should start. The counting start from a zero.endPosition - the position before which tag should should be closed.tag - the tag name without angle brackets, just a wordcssClass - the optional css classpublic static java.lang.String wrapInTag(java.lang.String line,
java.lang.String tag,
java.lang.String cssClass)
line - the given linetag - the tag name without angle brackets, just a wordcssClass - the optional css class