Interface Patch<E>

  • Type Parameters:
    E - the type of compared elements
    All Superinterfaces:
    Collection<Delta<E>>, Iterable<Delta<E>>, List<Delta<E>>

    public interface Patch<E>
    extends List<Delta<E>>
    A list of deltas between two versions.
    Version:
    $Id: f234a57724eb95d5c8e0395fb0446379b3aea625 $
    • Method Detail

      • apply

        List<E> apply​(List<E> target)
               throws PatchException
        Apply the patch.
        Parameters:
        target - the list on which to apply the patch
        Returns:
        the modified list
        Throws:
        PatchException - failed to apply the patch
      • restore

        List<E> restore​(List<E> target)
                 throws PatchException
        Invert the patch.
        Parameters:
        target - the list on which to apply an inverted version of the patch
        Returns:
        the modified list
        Throws:
        PatchException - failed to apply the patch