|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xwiki.gwt.wysiwyg.client.diff.ToString
org.xwiki.gwt.wysiwyg.client.diff.Delta
public abstract class Delta
Holds a "delta" difference between to revisions of a text.
Diff,
Chunk,
modifications
27 Apr 2003 bwm
Added getOriginal() and getRevised() accessor methods Added visitor pattern
accept() method| Field Summary | |
|---|---|
protected Chunk |
original
|
protected Chunk |
revised
|
| Constructor Summary | |
|---|---|
Delta()
Creates an uninitialized delta. |
|
Delta(Chunk orig,
Chunk rev)
Creates a delta object with the given chunks from the original and revised texts. |
|
| Method Summary | |
|---|---|
abstract void |
accept(RevisionVisitor visitor)
Accepts a visitor. |
abstract void |
applyTo(java.util.List target)
Applies this delta as a patch to the given text. |
Chunk |
getOriginal()
Accessor method to return the chunk representing the original sequence of items |
Chunk |
getRevised()
Accessor method to return the chunk representing the updated sequence of items. |
void |
init(Chunk orig,
Chunk rev)
Initializaes the delta with the given chunks from the original and revised texts. |
static Delta |
newDelta(Chunk orig,
Chunk rev)
Returns a Delta that corresponds to the given chunks in the original and revised text respectively. |
void |
patch(java.util.List target)
Applies this delta as a patch to the given text. |
java.lang.String |
toRCSString(java.lang.String EOL)
Converts this delta into its RCS style string representation. |
abstract void |
toRCSString(java.lang.StringBuffer s,
java.lang.String EOL)
Converts this delta into its RCS style string representation. |
void |
toString(java.lang.StringBuffer s)
Converts this delta into its Unix diff style string representation. |
abstract void |
verify(java.util.List target)
Verifies that this delta can be used to patch the given text. |
| Methods inherited from class org.xwiki.gwt.wysiwyg.client.diff.ToString |
|---|
arrayToString, stringToArray, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Chunk original
protected Chunk revised
| Constructor Detail |
|---|
public Delta()
public Delta(Chunk orig,
Chunk rev)
| Method Detail |
|---|
public static Delta newDelta(Chunk orig,
Chunk rev)
orig - the chunk in the original text.rev - the chunk in the revised text.
public void init(Chunk orig,
Chunk rev)
public abstract void verify(java.util.List target)
throws PatchFailedException
target - the text to patch.
PatchFailedException - if the patch cannot be applied.
public final void patch(java.util.List target)
throws PatchFailedException
target - the text to patch.
PatchFailedException - if the patch cannot be applied.public abstract void applyTo(java.util.List target)
target - the text to patch.
PatchFailedException - if the patch cannot be applied.public void toString(java.lang.StringBuffer s)
toString in class ToStrings - a StringBuffer to which the string
representation will be appended.
public abstract void toRCSString(java.lang.StringBuffer s,
java.lang.String EOL)
s - a StringBuffer to which the string
representation will be appended.EOL - the string to use as line separator.public java.lang.String toRCSString(java.lang.String EOL)
EOL - the string to use as line separator.public Chunk getOriginal()
public Chunk getRevised()
public abstract void accept(RevisionVisitor visitor)
See the Visitor pattern in "Design Patterns" by the GOF4.
visitor - The visitor.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||