Class AddDelta


public class AddDelta extends Delta
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:
  • Constructor Details

    • AddDelta

      public AddDelta(int origpos, Chunk rev)
      Construct.
      Parameters:
      origpos -
      rev -
  • Method Details

    • verify

      public void verify(List<Object> target) throws PatchFailedException
      Description copied from class: Delta
      Verifies that this delta can be used to patch the given text.
      Specified by:
      verify in class Delta
      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: Delta
      Applies this delta as a patch to the given text.
      Specified by:
      applyTo in class Delta
      Parameters:
      target - the text to patch.
    • toString

      public void toString(StringBuilder s)
      Description copied from class: Delta
      Converts this delta into its Unix diff style string representation.
      Overrides:
      toString in class Delta
      Parameters:
      s - a StringBuffer to which the string representation will be appended.
    • toRCSString

      public void toRCSString(StringBuilder s, String EOL)
      Description copied from class: Delta
      Converts this delta into its RCS style string representation.
      Specified by:
      toRCSString in class Delta
      Parameters:
      s - a StringBuffer to 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: Delta
      Accepts a visitor.

      See the Visitor pattern in "Design Patterns" by the GOF4.

      Specified by:
      accept in class Delta
      Parameters:
      visitor - The visitor.