|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdifflib.Delta
public abstract class Delta
Describes the delta between original and revised texts.
| Nested Class Summary | |
|---|---|
static class |
Delta.TYPE
|
| Constructor Summary | |
|---|---|
Delta(Chunk original,
Chunk revised)
Construct the delta for original and revised chunks |
|
| Method Summary | |
|---|---|
abstract void |
applyTo(List<Object> target)
Applies this delta as the patch for a given target |
boolean |
equals(Object obj)
|
Chunk |
getOriginal()
|
Chunk |
getRevised()
|
abstract Delta.TYPE |
getType()
Returns the type of delta |
int |
hashCode()
|
abstract void |
restore(List<Object> target)
Cancel this delta for a given revised text. |
void |
setOriginal(Chunk original)
|
void |
setRevised(Chunk revised)
|
abstract void |
verify(List<?> target)
Verifies that this delta can be used to patch the given text. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Delta(Chunk original,
Chunk revised)
original - chunk describes the original textrevised - chunk describes the revised text| Method Detail |
|---|
public abstract void verify(List<?> target)
throws PatchFailedException
target - the text to patch.
PatchFailedException - if the patch cannot be applied.
public abstract void applyTo(List<Object> target)
throws PatchFailedException
target - the given target
PatchFailedExceptionpublic abstract void restore(List<Object> target)
target - the given revised textpublic abstract Delta.TYPE getType()
public Chunk getOriginal()
public void setOriginal(Chunk original)
original - the Chunk describing the original text to setpublic Chunk getRevised()
public void setRevised(Chunk revised)
revised - the Chunk describing the revised text to setpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||