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
public abstract class AbstractDelta<T> extends Object implements Serializable
Abstract delta between a source and a target.- Author:
- Tobias Warneke (t.warneke@gmx.net)
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidapplyTo(List<T> target)booleanequals(Object obj)Chunk<T>getSource()Chunk<T>getTarget()DeltaTypegetType()inthashCode()protected abstract voidrestore(List<T> target)protected 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.
-
-
-
Method Detail
-
getType
public DeltaType getType()
-
verifyChunkToFitTarget
protected VerifyChunk verifyChunkToFitTarget(List<T> target) throws PatchFailedException
Verify the chunk of this delta, to fit the target.- Parameters:
target-- Throws:
PatchFailedException
-
verifyAntApplyTo
protected VerifyChunk verifyAntApplyTo(List<T> target) throws PatchFailedException
- Throws:
PatchFailedException
-
applyTo
protected abstract void applyTo(List<T> target) throws PatchFailedException
- Throws:
PatchFailedException
-
withChunks
public abstract AbstractDelta<T> withChunks(Chunk<T> original, Chunk<T> revised)
Create a new delta of the actual instance with customized chunk data.
-
-