Class AbstractDelta<T>
java.lang.Object
com.github.difflib.patch.AbstractDelta<T>
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ChangeDelta, DeleteDelta, EqualDelta, InsertDelta
Abstract delta between a source and a target.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyFuzzyToAt(List<T> target, int fuzz, int position) Apply patch fuzzy.protected abstract voidbooleangetType()inthashCode()protected abstract voidprotected VerifyChunkverifyAntApplyTo(List<T> target) protected VerifyChunkverifyChunkToFitTarget(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.
-
Field Details
-
source
-
target
-
type
-
-
Constructor Details
-
AbstractDelta
-
-
Method Details
-
getSource
-
getTarget
-
getType
-
verifyChunkToFitTarget
Verify the chunk of this delta, to fit the target.- Parameters:
target-- Throws:
PatchFailedException
-
verifyAntApplyTo
- Throws:
PatchFailedException
-
applyTo
- Throws:
PatchFailedException
-
restore
-
applyFuzzyToAt
Apply patch fuzzy.- Parameters:
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. ignoressource.getPosition()- Throws:
PatchFailedException- See Also:
-
withChunks
-
hashCode
-
equals
-