Interface DiffSequence


public interface DiffSequence
Helps compute differences in sequences.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static org.slf4j.Logger logger  
  • Method Summary

    Static Methods 
    Modifier and Type Method Description
    static <T,​ K extends java.lang.Comparable<K>>
    DiffContext<T,​K>
    diffQueryOrderedChanges​(java.util.List<T> oldResults, java.util.List<T> newResults, DiffContext<T,​K> context)
    Computes a correct sequence of added, changed, removed and moved commands against a context between two lists.
  • Field Details

    • logger

      static final org.slf4j.Logger logger
  • Method Details

    • diffQueryOrderedChanges

      static <T,​ K extends java.lang.Comparable<K>> DiffContext<T,​K> diffQueryOrderedChanges​(java.util.List<T> oldResults, java.util.List<T> newResults, DiffContext<T,​K> context)
      Computes a correct sequence of added, changed, removed and moved commands against a context between two lists. O(N log N).
      Type Parameters:
      T - The document type
      K - The key type.
      Parameters:
      oldResults - The original sequence.
      newResults - The new sequence.
      context - A context against which to execute ordered commands.
      Returns:
      The context.