Returns the least 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 less than or equal to every other value in the array according to #compare @throws Illega
(int... array)
| 91 | |
| 92 | |
| 93 | public static int min(int... array) { |
| 94 | checkArgument(array.length > 0); |
| 95 | int min = flip(array[0]); |
| 96 | for (int i = 1; i < array.length; i++) { |
| 97 | int next = flip(array[i]); |
| 98 | if (next < min) { |
| 99 | min = next; |
| 100 | } |
| 101 | } |
| 102 | return flip(min); |
| 103 | } |
| 104 | |
| 105 | /** |
| 106 | * Returns the greatest value present in {@code array}, treating values as unsigned. |
no test coverage detected