public class ChangeDelta extends Delta
Delta,
Diff,
Chunk| Constructor and Description |
|---|
ChangeDelta(Chunk orig,
Chunk rev) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(RevisionVisitor visitor)
Accepts a visitor.
|
void |
applyTo(List target)
Applies this delta as a patch to the given text.
|
void |
toRCSString(StringBuffer s,
String EOL)
Converts this delta into its RCS style string representation.
|
void |
toString(StringBuffer s)
Converts this delta into its Unix diff style string representation.
|
void |
verify(List target)
Verifies that this delta can be used to patch the given text.
|
getOriginal, getRevised, init, newDelta, patch, toRCSStringarrayToString, arrayToString, stringToArray, toStringpublic void verify(List target) throws PatchFailedException
Deltaverify in class Deltatarget - the text to patch.PatchFailedException - if the patch cannot be applied.public void applyTo(List target)
Deltapublic void toString(StringBuffer s)
DeltatoString in class Deltas - a StringBuffer to which the string
representation will be appended.public void toRCSString(StringBuffer s, String EOL)
DeltatoRCSString in class Deltas - a StringBuffer to which the string
representation will be appended.EOL - the string to use as line separator.public void accept(RevisionVisitor visitor)
DeltaSee the Visitor pattern in "Design Patterns" by the GOF4.
Copyright © 2003–2021 Sakai Project. All rights reserved.