mirror of
https://github.com/java-diff-utils/java-diff-utils.git
synced 2026-03-13 10:11:17 +08:00
@@ -18,8 +18,8 @@ package com.github.difflib.algorithm;
|
||||
/**
|
||||
* Thrown whenever the differencing engine cannot produce the differences between two revisions of ta text.
|
||||
*
|
||||
* @see MyersDiff
|
||||
* @see difflib.DiffAlgorithm
|
||||
* @see com.github.difflib.algorithm.myers.MyersDiff
|
||||
* @see DiffAlgorithmI
|
||||
*/
|
||||
public class DifferentiationFailedException extends DiffException {
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ public final class MyersDiff<T> implements DiffAlgorithmI<T> {
|
||||
/**
|
||||
* Constructs a {@link Patch} from a difference path.
|
||||
*
|
||||
* @param path The path.
|
||||
* @param actualPath The path.
|
||||
* @param orig The original sequence.
|
||||
* @param rev The revised sequence.
|
||||
* @return A {@link Patch} script corresponding to the path.
|
||||
|
||||
@@ -19,10 +19,6 @@ package com.github.difflib.algorithm.myers;
|
||||
* A node in a diffpath.
|
||||
*
|
||||
* @author <a href="mailto:juanco@suigeneris.org">Juanco Anez</a>
|
||||
*
|
||||
* @see DiffNode
|
||||
* @see Snake
|
||||
*
|
||||
*/
|
||||
public final class PathNode {
|
||||
|
||||
@@ -78,10 +74,10 @@ public final class PathNode {
|
||||
}
|
||||
|
||||
/**
|
||||
* Skips sequences of {@link DiffNode DiffNodes} until a {@link Snake} or bootstrap node is found, or the end of the
|
||||
* Skips sequences of {@link PathNode PathNodes} until a snake or bootstrap node is found, or the end of the
|
||||
* path is reached.
|
||||
*
|
||||
* @return The next first {@link Snake} or bootstrap node in the path, or <code>null</code> if none found.
|
||||
* @return The next first {@link PathNode} or bootstrap node in the path, or <code>null</code> if none found.
|
||||
*/
|
||||
public final PathNode previousSnake() {
|
||||
if (isBootstrap()) {
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Objects;
|
||||
* Describes the change-delta between original and revised texts.
|
||||
*
|
||||
* @author <a href="dm.naumenko@gmail.com">Dmitry Naumenko</a>
|
||||
* @param T The type of the compared elements in the data 'lines'.
|
||||
* @param <T> The type of the compared elements in the data 'lines'.
|
||||
*/
|
||||
public final class ChangeDelta<T> extends AbstractDelta<T> {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.Objects;
|
||||
* </p>
|
||||
*
|
||||
* @author <a href="dm.naumenko@gmail.com>Dmitry Naumenko</a>
|
||||
* @param T The type of the compared elements in the 'lines'.
|
||||
* @param <T> The type of the compared elements in the 'lines'.
|
||||
*/
|
||||
public final class Chunk<T> {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
* Describes the delete-delta between original and revised texts.
|
||||
*
|
||||
* @author <a href="dm.naumenko@gmail.com">Dmitry Naumenko</a>
|
||||
* @param T The type of the compared elements in the 'lines'.
|
||||
* @param <T> The type of the compared elements in the 'lines'.
|
||||
*/
|
||||
public final class DeleteDelta<T> extends AbstractDelta<T> {
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.List;
|
||||
* Describes the add-delta between original and revised texts.
|
||||
*
|
||||
* @author <a href="dm.naumenko@gmail.com">Dmitry Naumenko</a>
|
||||
* @param T The type of the compared elements in the 'lines'.
|
||||
* @param <T> The type of the compared elements in the 'lines'.
|
||||
*/
|
||||
public final class InsertDelta<T> extends AbstractDelta<T> {
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import java.util.ListIterator;
|
||||
* Describes the patch holding all deltas between the original and revised texts.
|
||||
*
|
||||
* @author <a href="dm.naumenko@gmail.com">Dmitry Naumenko</a>
|
||||
* @param T The type of the compared elements in the 'lines'.
|
||||
* @param <T> The type of the compared elements in the 'lines'.
|
||||
*/
|
||||
public final class Patch<T> {
|
||||
|
||||
|
||||
@@ -98,8 +98,7 @@ public class DiffRowGenerator {
|
||||
*
|
||||
* @param startPosition the position from which tag should start. The counting start from a zero.
|
||||
* @param endPosition the position before which tag should should be closed.
|
||||
* @param tag the tag name without angle brackets, just a word
|
||||
* @param cssClass the optional css class
|
||||
* @param tagGenerator the tag generator
|
||||
*/
|
||||
static void wrapInTag(List<String> sequence, int startPosition,
|
||||
int endPosition, Function<Boolean, String> tagGenerator) {
|
||||
@@ -179,7 +178,6 @@ public class DiffRowGenerator {
|
||||
* for displaying side-by-side diff.
|
||||
*
|
||||
* @param original the original text
|
||||
* @param revised the revised text
|
||||
* @param patch the given patch
|
||||
* @return the DiffRows between original and revised texts
|
||||
*/
|
||||
@@ -400,7 +398,7 @@ public class DiffRowGenerator {
|
||||
/**
|
||||
* Generator for Old-Text-Tags.
|
||||
*
|
||||
* @param tag the tag to set. Without angle brackets. Default: span.
|
||||
* @param generator the tag generator
|
||||
* @return builder with configured ignoreBlankLines parameter
|
||||
*/
|
||||
public Builder oldTag(Function<Boolean, String> generator) {
|
||||
|
||||
@@ -10,7 +10,7 @@ public final class TestConstants {
|
||||
|
||||
public static final String BASE_FOLDER_RESOURCES = "target/test-classes/";
|
||||
/**
|
||||
* The base folder containing the test files. Ends with {@link #FS}.
|
||||
* The base folder containing the test files.
|
||||
*/
|
||||
public static final String MOCK_FOLDER = BASE_FOLDER_RESOURCES + "/mocks/";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user