public class AddDelta extends Delta
Delta
,
Diff
,
Chunk
DeltaClass, original, revised
Constructor and Description |
---|
AddDelta() |
AddDelta(int origpos,
Chunk rev) |
Modifier and Type | Method and Description |
---|---|
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.
|
getOriginal, getRevised, init, newDelta, patch, toRCSString
arrayToString, arrayToString, stringToArray, stringToArraya, stringToArrayold, toString
AddDelta()
public AddDelta(int origpos, Chunk rev)
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
public void toString(java.lang.StringBuffer s)
Delta
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.
Copyright 2002 the Apache Software Foundation
Copyright ? 1999-2001 Juancarlo A?ez, Caracas, Venezuela.
All rights reserved
. http://www.suigeneris.org/jrcs