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

Method min

output/java_guava/1.4.18/Longs.java:213–222  ·  view source on GitHub ↗

Returns the least value present in array. @param array a nonempty array of long values @return the value present in array that is less than or equal to every other value in the array @throws IllegalArgumentException if array is empty

(long... array)

Source from the content-addressed store, hash-verified

211
212
213 public static long min(long... array) {
214 checkArgument(array.length > 0);
215 long min = array[0];
216 for (int i = 1; i < array.length; i++) {
217 if (array[i] < min) {
218 min = array[i];
219 }
220 }
221 return min;
222 }
223
224 /**
225 * Returns the greatest value present in {@code array}.

Callers 1

compareMethod · 0.45

Calls 1

checkArgumentMethod · 0.45

Tested by

no test coverage detected