T - The type of the compared elements in the 'lines'.public class DeleteDelta<T> extends Delta<T>
Delta.DeltaType| Constructor and Description |
|---|
DeleteDelta(Chunk<T> original,
Chunk<T> revised)
Creates a change delta with the two given chunks.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(java.util.List<T> target)
Applies this delta as the patch for a given target
|
DeleteDelta<T> |
copy() |
Delta.DeltaType |
getType()
Returns the type of delta
|
void |
restore(java.util.List<T> target)
Cancel this delta for a given revised text.
|
java.lang.String |
toString() |
void |
verify(java.util.List<T> target)
Verifies that this delta can be used to patch the given text.
|
equals, getOriginal, getRevised, hashCode, setOriginal, setRevisedpublic void applyTo(java.util.List<T> target) throws PatchFailedException
applyTo in class Delta<T>target - the given targetPatchFailedException - if the patch cannot be applied.public void restore(java.util.List<T> target)
public Delta.DeltaType getType()
Deltapublic void verify(java.util.List<T> target) throws PatchFailedException
Deltaverify in class Delta<T>target - the text to patch.PatchFailedException - if the patch cannot be applied.public java.lang.String toString()
toString in class java.lang.Objectpublic DeleteDelta<T> copy()