public static class DiffRowGenerator.Builder extends Object
Modifier and Type | Method and Description |
---|---|
DiffRowGenerator |
build()
Build the DiffRowGenerator.
|
DiffRowGenerator.Builder |
columnWidth(int width)
Set the column width of generated lines of original and revised texts.
|
DiffRowGenerator.Builder |
equalizer(BiPredicate<String,String> equalizer)
Provide an equalizer for diff processing.
|
DiffRowGenerator.Builder |
ignoreWhiteSpaces(boolean val)
Ignore white spaces in generating diff rows or not.
|
DiffRowGenerator.Builder |
inlineDiffBySplitter(Function<String,List<String>> inlineDiffSplitter)
To provide some customized splitting a splitter can be provided.
|
DiffRowGenerator.Builder |
inlineDiffByWord(boolean inlineDiffByWord)
Per default each character is separatly processed.
|
DiffRowGenerator.Builder |
lineNormalizer(Function<String,String> lineNormalizer)
By default DiffRowGenerator preprocesses lines for HTML output.
|
DiffRowGenerator.Builder |
mergeOriginalRevised(boolean mergeOriginalRevised)
Merge the complete result within the original text.
|
DiffRowGenerator.Builder |
newTag(BiFunction<DiffRow.Tag,Boolean,String> generator)
Generator for New-Text-Tags.
|
DiffRowGenerator.Builder |
newTag(Function<Boolean,String> generator)
Generator for New-Text-Tags.
|
DiffRowGenerator.Builder |
oldTag(BiFunction<DiffRow.Tag,Boolean,String> generator)
Generator for Old-Text-Tags.
|
DiffRowGenerator.Builder |
oldTag(Function<Boolean,String> generator)
Generator for Old-Text-Tags.
|
DiffRowGenerator.Builder |
processDiffs(Function<String,String> processDiffs)
Processor for diffed text parts.
|
DiffRowGenerator.Builder |
replaceOriginalLinefeedInChangesWithSpaces(boolean replace)
Sometimes it happens that a change contains multiple lines.
|
DiffRowGenerator.Builder |
reportLinesUnchanged(boolean val)
Give the originial old and new text lines to Diffrow without any additional processing
and without any tags to highlight the change.
|
DiffRowGenerator.Builder |
showInlineDiffs(boolean val)
Show inline diffs in generating diff rows or not.
|
public DiffRowGenerator.Builder showInlineDiffs(boolean val)
val
- the value to set. Default: false.public DiffRowGenerator.Builder ignoreWhiteSpaces(boolean val)
val
- the value to set. Default: true.public DiffRowGenerator.Builder reportLinesUnchanged(boolean val)
val
- the value to set. Default: false.public DiffRowGenerator.Builder oldTag(BiFunction<DiffRow.Tag,Boolean,String> generator)
generator
- the tag generatorpublic DiffRowGenerator.Builder oldTag(Function<Boolean,String> generator)
generator
- the tag generatorpublic DiffRowGenerator.Builder newTag(BiFunction<DiffRow.Tag,Boolean,String> generator)
generator
- public DiffRowGenerator.Builder newTag(Function<Boolean,String> generator)
generator
- public DiffRowGenerator.Builder processDiffs(Function<String,String> processDiffs)
processDiffs
- public DiffRowGenerator.Builder columnWidth(int width)
width
- the width to set. Making it < 0 doesn't make any sense. Default 80.public DiffRowGenerator build()
public DiffRowGenerator.Builder mergeOriginalRevised(boolean mergeOriginalRevised)
mergeOriginalRevised
- public DiffRowGenerator.Builder inlineDiffByWord(boolean inlineDiffByWord)
false: (aBa : aba) -- changed: a(B)a : a(b)a true: (aBa : aba) -- changed: (aBa) : (aba)
public DiffRowGenerator.Builder inlineDiffBySplitter(Function<String,List<String>> inlineDiffSplitter)
inlineDiffSplitter
- public DiffRowGenerator.Builder lineNormalizer(Function<String,String> lineNormalizer)
lineNormalizer
- public DiffRowGenerator.Builder equalizer(BiPredicate<String,String> equalizer)
equalizer
- equalizer for diff processing.public DiffRowGenerator.Builder replaceOriginalLinefeedInChangesWithSpaces(boolean replace)
replace
- Copyright © 2009–2020 java-diff-utils. All rights reserved.