Class ELArithmetic.BigDecimalDelegate

  • Enclosing class:
    ELArithmetic

    public static final class ELArithmetic.BigDecimalDelegate
    extends ELArithmetic
    Arithmetic delegate for BigDecimal operations.
    • Constructor Detail

      • BigDecimalDelegate

        public BigDecimalDelegate()
        Construct a new BigDecimalDelegate.
    • Method Detail

      • add

        protected java.lang.Number add​(java.lang.Number num0,
                                       java.lang.Number num1)
        Description copied from class: ELArithmetic
        Add two numbers.
        Specified by:
        add in class ELArithmetic
        Parameters:
        num0 - The first number
        num1 - The second number
        Returns:
        The sum
      • coerce

        protected java.lang.Number coerce​(java.lang.Number num)
        Description copied from class: ELArithmetic
        Coerce a number to the delegate's preferred type.
        Specified by:
        coerce in class ELArithmetic
        Parameters:
        num - The number to coerce
        Returns:
        The coerced number
      • coerce

        protected java.lang.Number coerce​(java.lang.String str)
        Description copied from class: ELArithmetic
        Coerce a string to a number.
        Specified by:
        coerce in class ELArithmetic
        Parameters:
        str - The string to coerce
        Returns:
        The coerced number
      • divide

        protected java.lang.Number divide​(java.lang.Number num0,
                                          java.lang.Number num1)
        Description copied from class: ELArithmetic
        Divide two numbers.
        Specified by:
        divide in class ELArithmetic
        Parameters:
        num0 - The dividend
        num1 - The divisor
        Returns:
        The quotient
      • subtract

        protected java.lang.Number subtract​(java.lang.Number num0,
                                            java.lang.Number num1)
        Description copied from class: ELArithmetic
        Subtract two numbers.
        Specified by:
        subtract in class ELArithmetic
        Parameters:
        num0 - The minuend
        num1 - The subtrahend
        Returns:
        The difference
      • mod

        protected java.lang.Number mod​(java.lang.Number num0,
                                       java.lang.Number num1)
        Description copied from class: ELArithmetic
        Compute the modulo of two numbers.
        Specified by:
        mod in class ELArithmetic
        Parameters:
        num0 - The dividend
        num1 - The divisor
        Returns:
        The remainder
      • multiply

        protected java.lang.Number multiply​(java.lang.Number num0,
                                            java.lang.Number num1)
        Description copied from class: ELArithmetic
        Multiply two numbers.
        Specified by:
        multiply in class ELArithmetic
        Parameters:
        num0 - The first number
        num1 - The second number
        Returns:
        The product
      • matches

        public boolean matches​(java.lang.Object obj0,
                               java.lang.Object obj1)
        Description copied from class: ELArithmetic
        Check if this delegate matches the given operand types.
        Specified by:
        matches in class ELArithmetic
        Parameters:
        obj0 - The first operand
        obj1 - The second operand
        Returns:
        true if this delegate should handle these types