Top Description Constructors Methods
com.github.difflib.patch

public final Class ChangeDelta<T>

extends AbstractDelta<T>
Class Inheritance
Type Parameters
<T>
The type of the compared elements in the data 'lines'.
Imports
java.util.List, .Objects

Describes the change-delta between original and revised texts.
Author
Dmitry Naumenko

Constructor Summary

AccessConstructor and Description
public
ChangeDelta(Chunk<T>
The source chunk. Must not be null.
source
,
Chunk<T>
The target chunk. Must not be null.
target
)

Creates a change delta with the two given chunks.

Method Summary

Modifier and TypeMethod and Description
protected void
applyFuzzyToAt(List<T> target, int fuzz, int position)

Overrides com.github.difflib.patch.AbstractDelta.applyFuzzyToAt.

Apply patch fuzzy.

protected void
protected void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public AbstractDelta<T>
withChunks(Chunk<T> original, Chunk<T> revised)

Implements abstract com.github.difflib.patch.AbstractDelta.withChunks.

Create a new delta of the actual instance with customized chunk data.

Inherited from com.github.difflib.patch.AbstractDelta:
equalsgetSourcegetTargetgetTypehashCodeverifyAndApplyToverifyChunkToFitTarget

Constructor Detail

ChangeDeltaback to summary
public ChangeDelta(Chunk<T> source, Chunk<T> target)

Creates a change delta with the two given chunks.

Parameters
source:Chunk<T>

The source chunk. Must not be null.

target:Chunk<T>

The target chunk. Must not be null.

Method Detail

applyFuzzyToAtback to summary
protected void applyFuzzyToAt(List<T> target, int fuzz, int position) throws PatchFailedException

Overrides com.github.difflib.patch.AbstractDelta.applyFuzzyToAt.

Doc from com.github.difflib.patch.AbstractDelta.applyFuzzyToAt.

Apply patch fuzzy.

applyToback to summary
protected void applyTo(List<T> target) throws PatchFailedException

Implements abstract com.github.difflib.patch.AbstractDelta.applyTo.

Annotations
@Override
restoreback to summary
protected void restore(List<T> target)

Implements abstract com.github.difflib.patch.AbstractDelta.restore.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
withChunksback to summary
public AbstractDelta<T> withChunks(Chunk<T> original, Chunk<T> revised)

Implements abstract com.github.difflib.patch.AbstractDelta.withChunks.

Doc from com.github.difflib.patch.AbstractDelta.withChunks.

Create a new delta of the actual instance with customized chunk data.

Annotations
@Override