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

Method min

output/java_guava/1.4.19/UnsignedBytes.java:144–154  ·  view source on GitHub ↗

Returns the least value present in array. @param array a nonempty array of byte 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

(byte... array)

Source from the content-addressed store, hash-verified

142
143
144 public static byte min(byte... array) {
145 checkArgument(array.length > 0);
146 int min = toInt(array[0]);
147 for (int i = 1; i < array.length; i++) {
148 int next = toInt(array[i]);
149 if (next < min) {
150 min = next;
151 }
152 }
153 return (byte) min;
154 }
155
156 /**
157 * Returns the greatest value present in {@code array}.

Callers 2

compareMethod · 0.45
compareMethod · 0.45

Calls 2

toIntMethod · 0.95
checkArgumentMethod · 0.45

Tested by

no test coverage detected