MCPcopy Create free account
hub / github.com/apache/tomcat / multiply

Method multiply

java/org/apache/el/lang/ELArithmetic.java:402–412  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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) {

Callers 6

testMultiply01Method · 0.95
getValueMethod · 0.95
multiplyMethod · 0.45
multiplyMethod · 0.45
multiplyMethod · 0.45

Calls 3

findDelegateMethod · 0.95
coerceMethod · 0.95
valueOfMethod · 0.45

Tested by 2

testMultiply01Method · 0.76