T - The type of the compared elements in the 'lines'.public class Patch<T>
extends java.lang.Object
Describes the patch holding all deltas between the original and revised texts.
| Modifier and Type | Field and Description |
|---|---|
private java.util.List<Delta<T>> |
deltas |
| Constructor and Description |
|---|
Patch() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDelta(Delta<T> delta)
Add the given delta to this patch
|
java.util.List<T> |
applyTo(java.util.List<T> target)
Apply this patch to the given target
|
java.util.List<Delta<T>> |
getDeltas()
Get the list of computed deltas
|
public java.util.List<T> applyTo(java.util.List<T> target) throws java.lang.IllegalStateException
java.lang.IllegalStateException - if can't apply patchpublic void addDelta(Delta<T> delta)
delta - the given delta