T
- The type of the compared elements in the data 'lines'.public final class ChangeDelta<T> extends AbstractDelta<T>
Constructor and Description |
---|
ChangeDelta(Chunk<T> source,
Chunk<T> target)
Creates a change delta with the two given chunks.
|
Modifier and Type | Method and Description |
---|---|
protected void |
applyFuzzyToAt(List<T> target,
int fuzz,
int position)
Apply patch fuzzy.
|
protected void |
applyTo(List<T> target) |
protected void |
restore(List<T> target) |
String |
toString() |
AbstractDelta<T> |
withChunks(Chunk<T> original,
Chunk<T> revised)
Create a new delta of the actual instance with customized chunk data.
|
equals, getSource, getTarget, getType, hashCode, verifyAntApplyTo, verifyChunkToFitTarget
protected void applyTo(List<T> target) throws PatchFailedException
applyTo
in class AbstractDelta<T>
PatchFailedException
protected void restore(List<T> target)
restore
in class AbstractDelta<T>
protected void applyFuzzyToAt(List<T> target, int fuzz, int position) throws PatchFailedException
AbstractDelta
applyFuzzyToAt
in class AbstractDelta<T>
target
- the list this patch will be applied tofuzz
- the number of elements to ignore before/after the patched elementsposition
- the position this patch will be applied to. ignores source.getPosition()
PatchFailedException
public AbstractDelta<T> withChunks(Chunk<T> original, Chunk<T> revised)
AbstractDelta
withChunks
in class AbstractDelta<T>
Copyright © 2009–2022 java-diff-utils. All rights reserved.