|
32 | 32 | import static java.util.stream.Collectors.toList; |
33 | 33 |
|
34 | 34 | /** |
35 | | - * This class for generating DiffRows for side-by-sidy view. You can customize the way of generating. For example, show |
36 | | - * inline diffs on not, ignoring white spaces or/and blank lines and so on. All parameters for generating are optional. |
37 | | - * If you do not specify them, the class will use the default values. |
| 35 | + * This class for generating DiffRows for side-by-sidy view. You can customize the way of |
| 36 | + * generating. For example, show inline diffs on not, ignoring white spaces or/and blank lines and |
| 37 | + * so on. All parameters for generating are optional. If you do not specify them, the class will use |
| 38 | + * the default values. |
38 | 39 | * |
39 | 40 | * These values are: showInlineDiffs = false; ignoreWhiteSpaces = true; ignoreBlankLines = true; ... |
40 | 41 | * |
@@ -52,7 +53,6 @@ public final class DiffRowGenerator { |
52 | 53 |
|
53 | 54 | public static final Function<String, String> LINE_NORMALIZER_FOR_HTML = StringUtils::normalize; |
54 | 55 |
|
55 | | - |
56 | 56 | /** |
57 | 57 | * Splitting lines by character to achieve char by char diff checking. |
58 | 58 | */ |
@@ -101,7 +101,8 @@ protected final static List<String> splitStringPreserveDelimiter(String str, Pat |
101 | 101 | /** |
102 | 102 | * Wrap the elements in the sequence with the given tag |
103 | 103 | * |
104 | | - * @param startPosition the position from which tag should start. The counting start from a zero. |
| 104 | + * @param startPosition the position from which tag should start. The counting start from a |
| 105 | + * zero. |
105 | 106 | * @param endPosition the position before which tag should should be closed. |
106 | 107 | * @param tagGenerator the tag generator |
107 | 108 | */ |
@@ -170,8 +171,8 @@ private DiffRowGenerator(Builder builder) { |
170 | 171 | } |
171 | 172 |
|
172 | 173 | /** |
173 | | - * Get the DiffRows describing the difference between original and revised texts using the given patch. Useful for |
174 | | - * displaying side-by-side diff. |
| 174 | + * Get the DiffRows describing the difference between original and revised texts using the given |
| 175 | + * patch. Useful for displaying side-by-side diff. |
175 | 176 | * |
176 | 177 | * @param original the original text |
177 | 178 | * @param revised the revised text |
@@ -182,8 +183,8 @@ public List<DiffRow> generateDiffRows(List<String> original, List<String> revise |
182 | 183 | } |
183 | 184 |
|
184 | 185 | /** |
185 | | - * Generates the DiffRows describing the difference between original and revised texts using the given patch. Useful |
186 | | - * for displaying side-by-side diff. |
| 186 | + * Generates the DiffRows describing the difference between original and revised texts using the |
| 187 | + * given patch. Useful for displaying side-by-side diff. |
187 | 188 | * |
188 | 189 | * @param original the original text |
189 | 190 | * @param patch the given patch |
@@ -402,8 +403,8 @@ public Builder ignoreWhiteSpaces(boolean val) { |
402 | 403 | } |
403 | 404 |
|
404 | 405 | /** |
405 | | - * Give the originial old and new text lines to Diffrow without any additional processing and without any tags to |
406 | | - * highlight the change. |
| 406 | + * Give the originial old and new text lines to Diffrow without any additional processing |
| 407 | + * and without any tags to highlight the change. |
407 | 408 | * |
408 | 409 | * @param val the value to set. Default: false. |
409 | 410 | * @return builder with configured reportLinesUnWrapped parameter |
@@ -438,8 +439,8 @@ public Builder newTag(Function<Boolean, String> generator) { |
438 | 439 | /** |
439 | 440 | * Set the column width of generated lines of original and revised texts. |
440 | 441 | * |
441 | | - * @param width the width to set. Making it < 0 doesn't have any sense. Default 80. @return builder with config |
442 | | - * ured ignoreBlankLines parameter |
| 442 | + * @param width the width to set. Making it < 0 doesn't have any sense. Default 80. @return |
| 443 | + * builder with config ured ignoreBlankLines parameter |
443 | 444 | */ |
444 | 445 | public Builder columnWidth(int width) { |
445 | 446 | if (width >= 0) { |
@@ -458,7 +459,8 @@ public DiffRowGenerator build() { |
458 | 459 | } |
459 | 460 |
|
460 | 461 | /** |
461 | | - * Merge the complete result within the original text. This makes sense for one line display. |
| 462 | + * Merge the complete result within the original text. This makes sense for one line |
| 463 | + * display. |
462 | 464 | * |
463 | 465 | * @param mergeOriginalRevised |
464 | 466 | * @return |
@@ -469,8 +471,9 @@ public Builder mergeOriginalRevised(boolean mergeOriginalRevised) { |
469 | 471 | } |
470 | 472 |
|
471 | 473 | /** |
472 | | - * Per default each character is separatly processed. This variant introduces processing by word, which does not |
473 | | - * deliver in word changes. Therefore the whole word will be tagged as changed: |
| 474 | + * Per default each character is separatly processed. This variant introduces processing by |
| 475 | + * word, which does not deliver in word changes. Therefore the whole word will be tagged as |
| 476 | + * changed: |
474 | 477 | * |
475 | 478 | * <pre> |
476 | 479 | * false: (aBa : aba) -- changed: a(B)a : a(b)a |
@@ -483,8 +486,8 @@ public Builder inlineDiffByWord(boolean inlineDiffByWord) { |
483 | 486 | } |
484 | 487 |
|
485 | 488 | /** |
486 | | - * To provide some customized splitting a splitter can be provided. Here someone could think about sentence splitter, |
487 | | - * comma splitter or stuff like that. |
| 489 | + * To provide some customized splitting a splitter can be provided. Here someone could think |
| 490 | + * about sentence splitter, comma splitter or stuff like that. |
488 | 491 | * |
489 | 492 | * @param inlineDiffSplitter |
490 | 493 | * @return |
@@ -495,8 +498,9 @@ public Builder inlineDiffBySplitter(Function<String, List<String>> inlineDiffSpl |
495 | 498 | } |
496 | 499 |
|
497 | 500 | /** |
498 | | - * By default DiffRowGenerator preprocesses lines for HTML output. Tabs and special HTML characters like "<" |
499 | | - * are replaced with its encoded value. To change this you can provide a customized line normalizer here. |
| 501 | + * By default DiffRowGenerator preprocesses lines for HTML output. Tabs and special HTML |
| 502 | + * characters like "<" are replaced with its encoded value. To change this you can |
| 503 | + * provide a customized line normalizer here. |
500 | 504 | * |
501 | 505 | * @param lineNormalizer |
502 | 506 | * @return |
|