Class OrderedIterableMerge


  • public class OrderedIterableMerge
    extends java.lang.Object
    Since:
    2.1
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> java.lang.Iterable<T> mergeUniques​(java.lang.Iterable<T> first, java.lang.Iterable<T> second, java.util.Comparator<T> comparator)
      Lazily merges two iterables, each ordered according to a given comparator.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • mergeUniques

        public static <T> java.lang.Iterable<T> mergeUniques​(java.lang.Iterable<T> first,
                                                             java.lang.Iterable<T> second,
                                                             java.util.Comparator<T> comparator)
        Lazily merges two iterables, each ordered according to a given comparator. Retains order in the result, and also eliminates any duplicates that appear in both arguments.