(Object x)
| 1331 | } |
| 1332 | |
| 1333 | static public float floatCast(Object x){ |
| 1334 | if(x instanceof Float) |
| 1335 | return ((Float) x).floatValue(); |
| 1336 | |
| 1337 | double n = ((Number) x).doubleValue(); |
| 1338 | if(n < -Float.MAX_VALUE || n > Float.MAX_VALUE) |
| 1339 | throw new IllegalArgumentException("Value out of range for float: " + x); |
| 1340 | |
| 1341 | return (float) n; |
| 1342 | |
| 1343 | } |
| 1344 | |
| 1345 | static public float floatCast(byte x){ |
| 1346 | return x; |
no test coverage detected