public class DiffRowGenerator extends Object
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 |
|---|---|
List<DiffRow> |
generateDiffRows(List<String> original,
List<String> revised)
Get the DiffRows describing the difference between original and revised texts using the
given patch.
|
List<DiffRow> |
generateDiffRows(List<String> original,
List<String> revised,
Patch<String> patch)
Generates the DiffRows describing the difference between original and revised texts using the
given patch.
|
static LinkedList<String> |
wrapInTag(LinkedList<String> sequence,
int startPosition,
int endPosition,
String tag,
String cssClass)
Wrap the elements in the sequence with the given tag
|
static String |
wrapInTag(String line,
String tag,
String cssClass)
Wrap the given line with the given tag
|
public List<DiffRow> generateDiffRows(List<String> original, List<String> revised)
original - the original textrevised - the revised textpublic List<DiffRow> generateDiffRows(List<String> original, List<String> revised, Patch<String> patch)
original - the original textrevised - the revised textpatch - the given patchpublic static LinkedList<String> wrapInTag(LinkedList<String> sequence, int startPosition, int endPosition, String tag, String cssClass)
startPosition - 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 classCopyright © 2019. All rights reserved.