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

Method min

corpus/java/training/guava/collect/Ordering.java:509–519  ·  view source on GitHub ↗

Returns the least of the specified values according to this ordering. If there are multiple least values, the first of those is returned. The iterator will be left exhausted: its hasNext() method will return false. @param iterator the iterator whose minimum element is to be determin

(Iterator<E> iterator)

Source from the content-addressed store, hash-verified

507 * @since 11.0
508 */
509 @CanIgnoreReturnValue // TODO(kak): Consider removing this
510 public <E extends T> E min(Iterator<E> iterator) {
511 // let this throw NoSuchElementException as necessary
512 E minSoFar = iterator.next();
513
514 while (iterator.hasNext()) {
515 minSoFar = min(minSoFar, iterator.next());
516 }
517
518 return minSoFar;
519 }
520
521 /**
522 * Returns the least of the specified values according to this ordering. If

Callers 15

LocalCacheMethod · 0.45
distanceMethod · 0.45
entryIteratorMethod · 0.45
iteratorMethod · 0.45
intersectionMethod · 0.45
leastOfMethod · 0.45
findMinMethod · 0.45
capAtMaximumSizeMethod · 0.45
getMethod · 0.45
countMethod · 0.45

Calls 4

compareMethod · 0.95
nextMethod · 0.65
iteratorMethod · 0.65
hasNextMethod · 0.45

Tested by

no test coverage detected