Multiply two objects, coercing them to the appropriate numeric type. @param obj0 The first factor @param obj1 The second factor @return The result of the multiplication
(final Object obj0, final Object obj1)
| 400 | * @return The result of the multiplication |
| 401 | */ |
| 402 | public static Number multiply(final Object obj0, final Object obj1) { |
| 403 | final ELArithmetic delegate = findDelegate(obj0, obj1); |
| 404 | if (delegate == null) { |
| 405 | return Long.valueOf(0); |
| 406 | } |
| 407 | |
| 408 | Number num0 = delegate.coerce(obj0); |
| 409 | Number num1 = delegate.coerce(obj1); |
| 410 | |
| 411 | return delegate.multiply(num0, num1); |
| 412 | } |
| 413 | |
| 414 | private static ELArithmetic findDelegate(final Object obj0, final Object obj1) { |
| 415 | if (obj0 == null && obj1 == null) { |