|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectdifflib.Patch
public class Patch
Describes the patch holding all deltas between the original and revised texts.
| Constructor Summary | |
|---|---|
Patch()
|
|
| Method Summary | |
|---|---|
void |
addDelta(Delta delta)
Add the given delta to this patch |
java.util.List<?> |
applyTo(java.util.List<?> target)
Apply this patch to the given target |
Delta |
getDelta(int index)
Get the specific delta from patch deltas |
java.util.List<Delta> |
getDeltas()
Get the list of computed deltas |
java.util.List<?> |
restore(java.util.List<?> target)
Restore the text to original. |
void |
setDeltas(java.util.List<Delta> deltas)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Patch()
| Method Detail |
|---|
public java.util.List<?> applyTo(java.util.List<?> target)
throws PatchFailedException
target -
PatchFailedException - if can't apply patchpublic java.util.List<?> restore(java.util.List<?> target)
target - the given target
public void addDelta(Delta delta)
delta - the given deltapublic void setDeltas(java.util.List<Delta> deltas)
deltas - the deltas to setpublic java.util.List<Delta> getDeltas()
public Delta getDelta(int index)
index - the index of delta
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||