public abstract class AbstractDelta<T> extends Object implements Serializable
Constructor and Description |
---|
AbstractDelta(DeltaType type,
Chunk<T> source,
Chunk<T> target) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyFuzzyToAt(List<T> target,
int fuzz,
int position)
Apply patch fuzzy.
|
protected abstract void |
applyTo(List<T> target) |
boolean |
equals(Object obj) |
Chunk<T> |
getSource() |
Chunk<T> |
getTarget() |
DeltaType |
getType() |
int |
hashCode() |
protected abstract void |
restore(List<T> target) |
protected VerifyChunk |
verifyAntApplyTo(List<T> target) |
protected VerifyChunk |
verifyChunkToFitTarget(List<T> target)
Verify the chunk of this delta, to fit the target.
|
abstract AbstractDelta<T> |
withChunks(Chunk<T> original,
Chunk<T> revised)
Create a new delta of the actual instance with customized chunk data.
|
public DeltaType getType()
protected VerifyChunk verifyChunkToFitTarget(List<T> target) throws PatchFailedException
target
- PatchFailedException
protected VerifyChunk verifyAntApplyTo(List<T> target) throws PatchFailedException
PatchFailedException
protected abstract void applyTo(List<T> target) throws PatchFailedException
PatchFailedException
protected void applyFuzzyToAt(List<T> target, int fuzz, int position) throws PatchFailedException
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 abstract AbstractDelta<T> withChunks(Chunk<T> original, Chunk<T> revised)
Copyright © 2009–2022 java-diff-utils. All rights reserved.