Class InlineDiffChunk<E>

  • Type Parameters:
    E - the type of elements that form a chunk

    public class InlineDiffChunk<E>
    extends Object
    A group of consecutive elements that are targeted by the same operation (add, remove, keep) in an in-line diff.
    Since:
    4.1RC1
    Version:
    $Id: 470faae03c6b77f75c3cf1b31b513163eaa998de $
    • Constructor Detail

      • InlineDiffChunk

        public InlineDiffChunk​(InlineDiffChunk.Type type,
                               List<E> elements)
        Creates a new chunk with the specified type and elements.
        Parameters:
        type - the chunk type
        elements - the list of elements that form the chunk
    • Method Detail

      • getElements

        public List<E> getElements()
        Returns:
        the list of element that form this chunk
      • isAdded

        public boolean isAdded()
        Returns:
        true if this chunk was added, false otherwise
      • isDeleted

        public boolean isDeleted()
        Returns:
        true if this chunk was deleted, false otherwise
      • isUnmodified

        public boolean isUnmodified()
        Returns:
        true if this chunk was left unmodified, false otherwise
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object