public class InsertDelta<T> extends Delta<T>
Delta.TYPE| Constructor and Description |
|---|
InsertDelta(Chunk<T> original,
Chunk<T> revised)
Creates an insert delta with the two given chunks.
|
| Modifier and Type | Method and Description |
|---|---|
void |
applyTo(List<T> target)
Applies this delta as the patch for a given target
|
Delta.TYPE |
getType()
Returns the type of delta
|
void |
restore(List<T> target)
Cancel this delta for a given revised text.
|
String |
toString() |
void |
verify(List<T> target)
Verifies that this delta can be used to patch the given text.
|
equals, getOriginal, getRevised, hashCode, setOriginal, setRevisedpublic void applyTo(List<T> target) throws PatchFailedException
applyTo in class Delta<T>target - the given targetPatchFailedExceptionpublic void restore(List<T> target)
public void verify(List<T> target) throws PatchFailedException
Deltaverify in class Delta<T>target - the text to patch.PatchFailedException - if the patch cannot be applied.public Delta.TYPE getType()
DeltaCopyright © 2015. All rights reserved.