Package org.apache.wicket.util.diff
Class ChangeDelta
- java.lang.Object
-
- org.apache.wicket.util.diff.ToString
-
- org.apache.wicket.util.diff.Delta
-
- org.apache.wicket.util.diff.ChangeDelta
-
public class ChangeDelta extends Delta
Holds an change-delta between to revisions of a text.- Version:
- $Id: ChangeDelta.java,v 1.1 2006/03/12 00:24:21 juanca Exp $
- Author:
- Juanco Anez
- See Also:
Delta,Diff,Chunk
-
-
Constructor Summary
Constructors Constructor Description ChangeDelta(Chunk orig, Chunk rev)Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(RevisionVisitor visitor)Accepts a visitor.voidapplyTo(List<Object> target)Applies this delta as a patch to the given text.voidtoRCSString(StringBuilder s, String EOL)Converts this delta into its RCS style string representation.voidtoString(StringBuilder s)Converts this delta into its Unix diff style string representation.voidverify(List<Object> target)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 Detail
-
ChangeDelta
public ChangeDelta(Chunk orig, Chunk rev)
Construct.- Parameters:
orig-rev-
-
-
Method Detail
-
verify
public void verify(List<Object> target) throws PatchFailedException
Description copied from class:DeltaVerifies that this delta can be used to patch the given text.- Specified by:
verifyin classDelta- Parameters:
target- the text to patch.- Throws:
PatchFailedException- if the patch cannot be applied.
-
applyTo
public void applyTo(List<Object> target)
Description copied from class:DeltaApplies this delta as a patch to the given text.
-
toString
public void toString(StringBuilder s)
Description copied from class:DeltaConverts this delta into its Unix diff style string representation.- Overrides:
toStringin classDelta- Parameters:
s- aStringBufferto which the string representation will be appended.
-
toRCSString
public void toRCSString(StringBuilder s, String EOL)
Description copied from class:DeltaConverts this delta into its RCS style string representation.- Specified by:
toRCSStringin classDelta- Parameters:
s- aStringBufferto which the string representation will be appended.EOL- the string to use as line separator.
-
accept
public void accept(RevisionVisitor visitor)
Description copied from class:DeltaAccepts a visitor.See the Visitor pattern in "Design Patterns" by the GOF4.
-
-