|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jrcs.util.ToString
org.apache.commons.jrcs.diff.Delta
org.apache.commons.jrcs.diff.AddDelta
public class AddDelta
Holds an add-delta between to revisions of a text.
Delta
,
Diff
,
Chunk
Field Summary |
---|
Fields inherited from class org.apache.commons.jrcs.diff.Delta |
---|
DeltaClass, original, revised |
Constructor Summary | |
---|---|
AddDelta()
|
|
AddDelta(int origpos,
Chunk rev)
|
Method Summary | |
---|---|
void |
accept(RevisionVisitor visitor)
Accepts a visitor. |
void |
Accept(RevisionVisitor visitor)
|
void |
applyTo(java.util.List target)
Applies this delta as a patch to the given text. |
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. |
void |
verify(java.util.List target)
Verifies that this delta can be used to patch the given text. |
Methods inherited from class org.apache.commons.jrcs.diff.Delta |
---|
getOriginal, getRevised, init, newDelta, patch, toRCSString |
Methods inherited from class org.apache.commons.jrcs.util.ToString |
---|
arrayToString, arrayToString, stringToArray, stringToArraya, stringToArrayold, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
AddDelta()
public AddDelta(int origpos, Chunk rev)
Method Detail |
---|
public void verify(java.util.List target) throws PatchFailedException
Delta
verify
in class Delta
target
- the text to patch.
PatchFailedException
- if the patch cannot be applied.public void applyTo(java.util.List target)
Delta
applyTo
in class Delta
target
- the text to patch.public void toString(java.lang.StringBuffer s)
Delta
toString
in class Delta
s
- a StringBuffer
to which the string
representation will be appended.public void toRCSString(java.lang.StringBuffer s, java.lang.String EOL)
Delta
toRCSString
in class Delta
s
- a StringBuffer
to which the string
representation will be appended.EOL
- the string to use as line separator.public void Accept(RevisionVisitor visitor)
public void accept(RevisionVisitor visitor)
Delta
See the Visitor pattern in "Design Patterns" by the GOF4.
accept
in class Delta
visitor
- The visitor.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |