public abstract class Delta<T> extends Object
| Constructor and Description |
|---|
Delta(DeltaType deltaType,
Chunk<T> original,
Chunk<T> revised)
Construct the delta for original and revised chunks
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
applyTo(List<T> target)
Applies this delta as the patch for a given target
|
boolean |
equals(Object obj) |
Chunk<T> |
getOriginal() |
Chunk<T> |
getRevised() |
DeltaType |
getType() |
int |
hashCode() |
abstract void |
restore(List<T> target)
Cancel this delta for a given revised text.
|
void |
verify(List<T> target)
Verifies that this delta can be used to patch the given text.
|
public void verify(List<T> target) throws PatchFailedException
target - the text to patch.PatchFailedException - if the patch cannot be applied.public abstract void applyTo(List<T> target) throws PatchFailedException
target - the given targetPatchFailedExceptionpublic abstract void restore(List<T> target)
target - the given revised textpublic final DeltaType getType()
Copyright © 2009–2017 java-diff-utils. All rights reserved.