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:
    Delta, Diff, Chunk
    • Constructor Summary

      Constructors 
      Constructor Description
      AddDelta​(int origpos, Chunk rev)
      Construct.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(RevisionVisitor visitor)
      Accepts a visitor.
      void applyTo​(java.util.List<java.lang.Object> target)
      Applies this delta as a patch to the given text.
      void toRCSString​(java.lang.StringBuilder s, java.lang.String EOL)
      Converts this delta into its RCS style string representation.
      void toString​(java.lang.StringBuilder s)
      Converts this delta into its Unix diff style string representation.
      void verify​(java.util.List<java.lang.Object> target)
      Verifies that this delta can be used to patch the given text.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • AddDelta

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

      • applyTo

        public void applyTo​(java.util.List<java.lang.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.
        See Also:
        Delta.applyTo(java.util.List)
      • toString

        public void toString​(java.lang.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.
        See Also:
        Delta.toString(StringBuilder)
      • toRCSString

        public void toRCSString​(java.lang.StringBuilder s,
                                java.lang.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.
        See Also:
        Delta.toRCSString(StringBuilder, String)