| 396 | // } |
| 397 | |
| 398 | public static Object subtract(Object a, Object b) { |
| 399 | a = normalizeIntIfNeeded(a); |
| 400 | b = normalizeIntIfNeeded(b); |
| 401 | |
| 402 | if (a instanceof Long && b instanceof Long) { |
| 403 | return ((Long) a) - ((Long) b); |
| 404 | } else if (a instanceof Integer && b instanceof Integer) { |
| 405 | return ((Integer) a) - ((Integer) b); |
| 406 | } else if (a instanceof Double || b instanceof Double) { |
| 407 | return toDouble(a) - toDouble(b); |
| 408 | } else { |
| 409 | return null; |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | // public static int subtract(int a, int b) { return a - b; } |
| 414 | |