|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdifflib.Delta<T>
difflib.ChangeDelta<T>
public class ChangeDelta<T>
Describes the change-delta between original and revised texts.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class difflib.Delta |
|---|
Delta.TYPE |
| Constructor Summary | |
|---|---|
ChangeDelta(Chunk<T> original,
Chunk<T> revised)
Creates a change delta with the two given chunks. |
|
| Method Summary | |
|---|---|
void |
applyTo(List<T> target)
Applies this delta as the patch for a given target |
Delta.TYPE |
getType()
Returns the type of delta |
void |
restore(List<T> target)
Cancel this delta for a given revised text. |
String |
toString()
|
void |
verify(List<T> target)
Verifies that this delta can be used to patch the given text. |
| Methods inherited from class difflib.Delta |
|---|
equals, getOriginal, getRevised, hashCode, setOriginal, setRevised |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChangeDelta(Chunk<T> original,
Chunk<T> revised)
original - The original chunk. Must not be null.revised - The original chunk. Must not be null.| Method Detail |
|---|
public void applyTo(List<T> target)
throws PatchFailedException
applyTo in class Delta<T>target - the given target
PatchFailedExceptionpublic void restore(List<T> target)
restore in class Delta<T>target - the given revised text
public void verify(List<T> target)
throws PatchFailedException
verify in class Delta<T>target - the text to patch.
PatchFailedException - if the patch cannot be applied.public String toString()
toString in class Objectpublic Delta.TYPE getType()
Delta
getType in class Delta<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||