Package com.github.difflib.patch
Class EqualDelta<T>
- java.lang.Object
-
- com.github.difflib.patch.AbstractDelta<T>
-
- com.github.difflib.patch.EqualDelta<T>
-
- All Implemented Interfaces:
java.io.Serializable
public class EqualDelta<T> extends AbstractDelta<T>
This delta contains equal lines of data. Therefore nothing is to do in applyTo and restore.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EqualDelta(Chunk<T> source, Chunk<T> target)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidapplyFuzzyToAt(java.util.List<T> target, int fuzz, int delta)Apply patch fuzzy.protected voidapplyTo(java.util.List<T> target)protected voidrestore(java.util.List<T> target)java.lang.StringtoString()AbstractDelta<T>withChunks(Chunk<T> original, Chunk<T> revised)Create a new delta of the actual instance with customized chunk data.-
Methods inherited from class com.github.difflib.patch.AbstractDelta
equals, getSource, getTarget, getType, hashCode, verifyAntApplyTo, verifyChunkToFitTarget
-
-
-
-
Method Detail
-
applyTo
protected void applyTo(java.util.List<T> target) throws PatchFailedException
- Specified by:
applyToin classAbstractDelta<T>- Throws:
PatchFailedException
-
restore
protected void restore(java.util.List<T> target)
- Specified by:
restorein classAbstractDelta<T>
-
applyFuzzyToAt
protected void applyFuzzyToAt(java.util.List<T> target, int fuzz, int delta)
Apply patch fuzzy.- Overrides:
applyFuzzyToAtin classAbstractDelta<T>- Parameters:
target- the list this patch will be applied tofuzz- the number of elements to ignore before/after the patched elementsdelta- the position this patch will be applied to. ignoressource.getPosition()- See Also:
- Description of Fuzzy Patch for more information.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
withChunks
public AbstractDelta<T> withChunks(Chunk<T> original, Chunk<T> revised)
Description copied from class:AbstractDeltaCreate a new delta of the actual instance with customized chunk data.- Specified by:
withChunksin classAbstractDelta<T>
-
-