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

Method mergeSorted

output/java_guava/1.4.16/Iterators.java:1285–1290  ·  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

1283 */
1284
1285 @Beta
1286 public static <T> UnmodifiableIterator<T> mergeSorted(Iterable<? extends Iterator<? extends T>> iterators, Comparator<? super T> comparator) {
1287 checkNotNull(iterators, "iterators");
1288 checkNotNull(comparator, "comparator");
1289 return new MergingIterator<T>(iterators, comparator);
1290 }
1291
1292 /**
1293 * 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