|
||||||||||
| 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.Revision
public class Revision
A Revision holds the series of deltas that describe the differences between two sequences.
Delta,
Diff,
Chunk,
modifications 27 Apr 2003 bwm
Added visitor pattern Visitor interface and accept() method.| Constructor Summary | |
|---|---|
Revision()
Creates an empty Revision. |
|
| Method Summary | |
|---|---|
void |
accept(RevisionVisitor visitor)
Accepts a visitor. |
void |
addDelta(Delta delta)
Adds a delta to this revision. |
void |
applyTo(List target)
Applies the series of deltas in this revision as patches to the given text. |
Delta |
getDelta(int i)
Retrieves a delta from this revision by position. |
void |
insertDelta(Delta delta)
Adds a delta to the start of this revision. |
Object[] |
patch(Object[] src)
Applies the series of deltas in this revision as patches to the given text. |
int |
size()
Returns the number of deltas in this revision. |
String |
toRCSString()
Converts this delta into its RCS style string representation using the default line separator. |
String |
toRCSString(String EOL)
Converts this delta into its RCS style string representation. |
void |
toRCSString(StringBuffer s)
Converts this revision into its RCS style string representation. |
void |
toRCSString(StringBuffer s,
String EOL)
Converts this revision into its RCS style string representation. |
void |
toString(StringBuffer s)
Converts this revision into its Unix diff style string representation. |
| 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 |
| Constructor Detail |
|---|
public Revision()
| Method Detail |
|---|
public void addDelta(Delta delta)
delta - the Delta to add.public void insertDelta(Delta delta)
delta - the Delta to add.public Delta getDelta(int i)
i - the position of the delta to retrieve.
public int size()
public Object[] patch(Object[] src)
throws PatchFailedException
src - the text to patch, which the method doesn't change.
PatchFailedException - if any of the patches cannot be applied.
public void applyTo(List target)
throws PatchFailedException
target - the text to patch.
PatchFailedException - if any of the patches cannot be applied.public void toString(StringBuffer s)
toString in class ToStrings - a StringBuffer to which the string
representation will be appended.
public void toRCSString(StringBuffer s,
String EOL)
s - a StringBuffer to which the string
representation will be appended.EOL - the string to use as line separator.public void toRCSString(StringBuffer s)
s - a StringBuffer to which the string
representation will be appended.public String toRCSString(String EOL)
EOL - the string to use as line separator.public String toRCSString()
public void accept(RevisionVisitor visitor)
visitor - the visitor visiting this instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||