difflib
Class DeleteDelta

java.lang.Object
  extended by difflib.Delta
      extended by difflib.DeleteDelta

public class DeleteDelta
extends Delta

Describes the delete-delta between original and revised texts.

Author:
Dmitry Naumenko

Constructor Summary
DeleteDelta(Chunk original, Chunk revised)
          
 
Method Summary
 void applyTo(java.util.List<java.lang.Object> target)
          Applies this delta as the patch for a given target
 void restore(java.util.List<java.lang.Object> target)
          Cancel this delta for a given revised text.
 java.lang.String toString()
           
 void verify(java.util.List<?> target)
          Verifies that this delta can be used to patch the given text.
 
Methods inherited from class difflib.Delta
equals, getOriginal, getRevised, hashCode, setOriginal, setRevised
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteDelta

public DeleteDelta(Chunk original,
                   Chunk revised)

Method Detail

applyTo

public void applyTo(java.util.List<java.lang.Object> target)
             throws PatchFailedException
Applies this delta as the patch for a given target

Specified by:
applyTo in class Delta
Parameters:
target - the given target
Throws:
PatchFailedException

restore

public void restore(java.util.List<java.lang.Object> target)
Cancel this delta for a given revised text. The action is opposite to patch.

Specified by:
restore in class Delta
Parameters:
target - the given revised text

verify

public void verify(java.util.List<?> 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.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object