android/guava/src/com/google/common/collect/Iterators.java
@Beta
  public static <T> UnmodifiableIterator<T> mergeSorted(
      Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator) {
    checkNotNull(iterators, "iterators");
    checkNotNull(comparator, "comparator");

    return new MergingIterator<T>(iterators, comparator);
  }
@Beta
  public static <T> UnmodifiableIterator<T> mergeSorted(
      Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator) {
    checkNotNull(iterators, "iterators");
    checkNotNull(comparator, "comparator");

    return new MergingIterator<T>(iterators, comparator);
  }
Returns an iterator over the merged contents of all given {@code iterators}, traversing every
element of the input iterators. Equivalent entries will not be de-duplicated.

<p>Callers must ensure that the source {@code iterators} are in non-descending order as this
method does not sort its input.

<p>For any equivalent elements across all {@code iterators}, it is undefined which element is
returned first.

@since 11.0