Interface Delta<E>

  • Type Parameters:
    E - the type of compared elements

    public interface Delta<E>
    A delta between two version of a list.
    Version:
    $Id: 71863b4888c035be4d03fc95420ca02b0f66ed55 $
    • Method Detail

      • verify

        void verify​(List<E> target)
             throws PatchException
        Try to apply the delta on the provided list.
        Parameters:
        target - the list to modify
        Throws:
        PatchException - if the delta cannot be applied
      • apply

        void apply​(List<E> target)
            throws PatchException
        Apply the delta on the provided list.
        Parameters:
        target - the list to modify
        Throws:
        PatchException - if the delta cannot be applied
      • restore

        void restore​(List<E> target)
              throws PatchException
        Apply the an inverted version of the delta on the provided list.
        Parameters:
        target - the list to modify
        Throws:
        PatchException - if the delta cannot be applied
      • getType

        Delta.Type getType()
        Returns:
        the type of modification applied to the list
      • getPrevious

        Chunk<E> getPrevious()
        Returns:
        the chunk before the modification
      • getNext

        Chunk<E> getNext()
        Returns:
        the chunk after the modification
      • getMaxChunkSize

        default int getMaxChunkSize()
        Returns:
        the max size between the two chunks of the delta.
        Since:
        11.8RC1