Biggest number @param doubles the numbers @return the biggest one
(T... doubles)
| 262 | * @return the biggest one |
| 263 | */ |
| 264 | @SuppressWarnings("unchecked") |
| 265 | public static <T extends Number> T max(T... doubles) { |
| 266 | double max = Double.MIN_VALUE; |
| 267 | |
| 268 | for (T i : doubles) { |
| 269 | if (i.doubleValue() > max) { |
| 270 | max = i.doubleValue(); |
| 271 | } |
| 272 | } |
| 273 | |
| 274 | return (T) Double.valueOf(max); |
| 275 | } |
| 276 | |
| 277 | /** |
| 278 | * Smallest number |
no outgoing calls
no test coverage detected