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

Method max

output/java_guava/1.4.17/UnsignedBytes.java:166–176  ·  view source on GitHub ↗

Returns the greatest value present in array. @param array a nonempty array of byte values @return the value present in array that is greater 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

164
165
166 public static byte max(byte... array) {
167 checkArgument(array.length > 0);
168 int max = toInt(array[0]);
169 for (int i = 1; i < array.length; i++) {
170 int next = toInt(array[i]);
171 if (next > max) {
172 max = next;
173 }
174 }
175 return (byte) max;
176 }
177
178 /**
179 * Returns a string representation of x, where x is treated as unsigned.

Callers

nothing calls this directly

Calls 2

toIntMethod · 0.95
checkArgumentMethod · 0.45

Tested by

no test coverage detected