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

Method max

output/java_guava/1.4.18/UnsignedInts.java:115–125  ·  view source on GitHub ↗

Returns the greatest value present in array, treating values as unsigned. @param array a nonempty array of unsigned int values @return the value present in array that is greater than or equal to every other value in the array according to #compare @throws

(int... array)

Source from the content-addressed store, hash-verified

113
114
115 public static int max(int... array) {
116 checkArgument(array.length > 0);
117 int max = flip(array[0]);
118 for (int i = 1; i < array.length; i++) {
119 int next = flip(array[i]);
120 if (next > max) {
121 max = next;
122 }
123 }
124 return flip(max);
125 }
126
127 /**
128 * Returns a string containing the supplied unsigned {@code int} values separated by

Callers

nothing calls this directly

Calls 2

flipMethod · 0.95
checkArgumentMethod · 0.45

Tested by

no test coverage detected