Package com.github.difflib.patch
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 void
applyFuzzyToAt
(List<T> target, int fuzz, int position) Apply patch fuzzy.protected abstract void
boolean
getType()
int
hashCode()
protected abstract void
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.
-
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:
-
- Description of Fuzzy Patch for more information.
-
withChunks
Create a new delta of the actual instance with customized chunk data. -
hashCode
public int hashCode() -
equals
-