java.lang.Object
org.apache.wicket.util.diff.ToString
org.apache.wicket.util.diff.Delta
org.apache.wicket.util.diff.AddDelta
Holds an add-delta between to revisions of a text.
- Version:
- $Id: AddDelta.java,v 1.1 2006/03/12 00:24:21 juanca Exp $
- Author:
- Juanco Anez
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(RevisionVisitor visitor) Accepts a visitor.void
Applies this delta as a patch to the given text.void
toRCSString
(StringBuilder s, String EOL) Converts this delta into its RCS style string representation.void
Converts this delta into its Unix diff style string representation.void
Verifies that this delta can be used to patch the given text.Methods inherited from class org.apache.wicket.util.diff.Delta
getOriginal, getRevised, init, newDelta, patch, toRCSString
Methods inherited from class org.apache.wicket.util.diff.ToString
arrayToString, arrayToString, stringToArray, toString
-
Constructor Details
-
AddDelta
Construct.- Parameters:
origpos
-rev
-
-
-
Method Details
-
verify
Description copied from class:Delta
Verifies that this delta can be used to patch the given text.- Specified by:
verify
in classDelta
- Parameters:
target
- the text to patch.- Throws:
PatchFailedException
- if the patch cannot be applied.
-
applyTo
Description copied from class:Delta
Applies this delta as a patch to the given text. -
toString
Description copied from class:Delta
Converts this delta into its Unix diff style string representation.- Overrides:
toString
in classDelta
- Parameters:
s
- aStringBuffer
to which the string representation will be appended.
-
toRCSString
Description copied from class:Delta
Converts this delta into its RCS style string representation.- Specified by:
toRCSString
in classDelta
- Parameters:
s
- aStringBuffer
to which the string representation will be appended.EOL
- the string to use as line separator.
-
accept
Description copied from class:Delta
Accepts a visitor.See the Visitor pattern in "Design Patterns" by the GOF4.
-