java.lang.Object
org.apache.wicket.util.diff.ToString
org.apache.wicket.util.diff.Revision
A Revision holds the series of deltas that describe the differences between two sequences.
- Version:
- $Revision: 1.1 $ $Date: 2006/03/12 00:24:21 $
- Author:
- Juanco Anez, Brian McBride
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(RevisionVisitor visitor) Accepts a visitor.voidAdds a delta to this revision.voidApplies the series of deltas in this revision as patches to the given text.getDelta(int i) Retrieves a delta from this revision by position.voidinsertDelta(Delta delta) Adds a delta to the start of this revision.Object[]Applies the series of deltas in this revision as patches to the given text.intsize()Returns the number of deltas in this revision.Converts this delta into its RCS style string representation using the default line separator.toRCSString(String EOL) Converts this delta into its RCS style string representation.voidConverts this revision into its RCS style string representation.voidtoRCSString(StringBuilder s, String EOL) Converts this revision into its RCS style string representation.voidConverts this revision into its Unix diff style string representation.Methods inherited from class org.apache.wicket.util.diff.ToString
arrayToString, arrayToString, stringToArray, toString
-
Constructor Details
-
Revision
public Revision()Creates an empty Revision.
-
-
Method Details
-
addDelta
Adds a delta to this revision.- Parameters:
delta- theDeltato add.
-
insertDelta
Adds a delta to the start of this revision.- Parameters:
delta- theDeltato add.
-
getDelta
Retrieves a delta from this revision by position.- Parameters:
i- the position of the delta to retrieve.- Returns:
- the specified delta
-
size
Returns the number of deltas in this revision.- Returns:
- the number of deltas.
-
patch
Applies the series of deltas in this revision as patches to the given text.- Parameters:
src- the text to patch, which the method doesn't change.- Returns:
- the resulting text after the patches have been applied.
- Throws:
PatchFailedException- if any of the patches cannot be applied.
-
applyTo
Applies the series of deltas in this revision as patches to the given text.- Parameters:
target- the text to patch.- Throws:
PatchFailedException- if any of the patches cannot be applied.
-
toString
Converts this revision into its Unix diff style string representation.- Overrides:
toStringin classToString- Parameters:
s- aStringBufferto which the string representation will be appended.
-
toRCSString
Converts this revision into its RCS style string representation.- Parameters:
s- aStringBufferto which the string representation will be appended.EOL- the string to use as line separator.
-
toRCSString
Converts this revision into its RCS style string representation.- Parameters:
s- aStringBufferto which the string representation will be appended.
-
toRCSString
Converts this delta into its RCS style string representation.- Parameters:
EOL- the string to use as line separator.- Returns:
- String
-
toRCSString
Converts this delta into its RCS style string representation using the default line separator.- Returns:
- String
-
accept
Accepts a visitor.- Parameters:
visitor- theRevisionVisitorvisiting this instance
-