public class Patch<T> extends Object
| Constructor and Description |
|---|
Patch() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDelta(Delta<T> delta)
Add the given delta to this patch
|
List<T> |
applyTo(List<T> target)
Apply this patch to the given target
|
List<Delta<T>> |
getDeltas()
Get the list of computed deltas
|
List<T> |
restore(List<T> target)
Restore the text to original.
|
public List<T> applyTo(List<T> target) throws PatchFailedException
PatchFailedException - if can't apply patchpublic List<T> restore(List<T> target)
target - the given targetpublic void addDelta(Delta<T> delta)
delta - the given deltaCopyright © 2018. All rights reserved.