Class ELArithmetic.LongDelegate
java.lang.Object
org.apache.el.lang.ELArithmetic
org.apache.el.lang.ELArithmetic.LongDelegate
- Enclosing class:
ELArithmetic
Arithmetic delegate for long/integer operations.
-
Nested Class Summary
Nested classes/interfaces inherited from class ELArithmetic
ELArithmetic.BigDecimalDelegate, ELArithmetic.BigIntegerDelegate, ELArithmetic.DoubleDelegate, ELArithmetic.LongDelegate -
Field Summary
Fields inherited from class ELArithmetic
BIGDECIMAL, BIGINTEGER, DOUBLE, LONG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected NumberAdd two numbers.protected NumberCoerce a number to the delegate's preferred type.protected NumberCoerce a string to a number.protected NumberDivide two numbers.booleanCheck if this delegate matches the given operand types.protected NumberCompute the modulo of two numbers.protected NumberMultiply two numbers.protected NumberSubtract two numbers.Methods inherited from class ELArithmetic
add, coerce, divide, isNumber, isNumberType, mod, multiply, subtract
-
Constructor Details
-
LongDelegate
public LongDelegate()Construct a new LongDelegate.
-
-
Method Details
-
add
Description copied from class:ELArithmeticAdd two numbers.- Specified by:
addin classELArithmetic- Parameters:
num0- The first numbernum1- The second number- Returns:
- The sum
-
coerce
Description copied from class:ELArithmeticCoerce a number to the delegate's preferred type.- Specified by:
coercein classELArithmetic- Parameters:
num- The number to coerce- Returns:
- The coerced number
-
coerce
Description copied from class:ELArithmeticCoerce a string to a number.- Specified by:
coercein classELArithmetic- Parameters:
str- The string to coerce- Returns:
- The coerced number
-
divide
Description copied from class:ELArithmeticDivide two numbers.- Specified by:
dividein classELArithmetic- Parameters:
num0- The dividendnum1- The divisor- Returns:
- The quotient
-
mod
Description copied from class:ELArithmeticCompute the modulo of two numbers.- Specified by:
modin classELArithmetic- Parameters:
num0- The dividendnum1- The divisor- Returns:
- The remainder
-
subtract
Description copied from class:ELArithmeticSubtract two numbers.- Specified by:
subtractin classELArithmetic- Parameters:
num0- The minuendnum1- The subtrahend- Returns:
- The difference
-
multiply
Description copied from class:ELArithmeticMultiply two numbers.- Specified by:
multiplyin classELArithmetic- Parameters:
num0- The first numbernum1- The second number- Returns:
- The product
-
matches
Description copied from class:ELArithmeticCheck if this delegate matches the given operand types.- Specified by:
matchesin classELArithmetic- Parameters:
obj0- The first operandobj1- The second operand- Returns:
- true if this delegate should handle these types
-