MCPcopy Create free account
hub / github.com/antlr/codebuff / mergeSorted

Method mergeSorted

output/java_guava/1.4.19/Iterators.java:1286–1291  ·  view source on GitHub ↗

Returns an iterator over the merged contents of all given iterators, traversing every element of the input iterators. Equivalent entries will not be de-duplicated. Callers must ensure that the source iterators are in non-descending order as this method does not sort its input. <

(Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator)

Source from the content-addressed store, hash-verified

1284 */
1285
1286 @Beta
1287 public static <T> UnmodifiableIterator<T> mergeSorted(Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator) {
1288 checkNotNull(iterators, "iterators");
1289 checkNotNull(comparator, "comparator");
1290 return new MergingIterator<T>(iterators, comparator);
1291 }
1292
1293 /**
1294 * An iterator that performs a lazy N-way merge, calculating the next value

Callers 2

iteratorMethod · 0.95

Calls 1

checkNotNullMethod · 0.45

Tested by

no test coverage detected