|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdifflib.Delta<T>
difflib.InsertDelta<T>
public class InsertDelta<T>
Describes the add-delta between original and revised texts.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class difflib.Delta |
---|
Delta.TYPE |
Constructor Summary | |
---|---|
InsertDelta(Chunk<T> original,
Chunk<T> revised)
Creates an insert 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 InsertDelta(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
PatchFailedException
public void restore(List<T> target)
restore
in class Delta<T>
target
- the given revised textpublic void verify(List<T> target) throws PatchFailedException
Delta
verify
in class Delta<T>
target
- the text to patch.
PatchFailedException
- if the patch cannot be applied.public Delta.TYPE getType()
Delta
getType
in class Delta<T>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |