public final class Patch<T> extends Object
| 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
|
static <T> Patch<T> |
generate(List<T> original,
List<T> revised,
List<Change> changes) |
List<Delta<T>> |
getDeltas()
Get the list of computed deltas
|
List<T> |
restore(List<T> target)
Restore the text to original.
|
String |
toString() |
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 © 2009–2017 java-diff-utils. All rights reserved.