Class ELArithmetic

java.lang.Object
io.micronaut.el.runtime.ELArithmetic

@Internal public final class ELArithmetic extends Object
The arithmetic and string concatenation operators of the Jakarta Expression Language specification.

This class is invoked by the expressions generated at compilation time, it is not part of the public API of the module.

Since:
1.0
Author:
Denis Stepanov
  • Method Details

    • add

      public static Object add(@Nullable Object left, @Nullable Object right)
      The + operator described in the section 1.7.1 of the specification.
      Parameters:
      left - The left operand
      right - The right operand
      Returns:
      The result
    • subtract

      public static Object subtract(@Nullable Object left, @Nullable Object right)
      The - operator described in the section 1.7.1 of the specification.
      Parameters:
      left - The left operand
      right - The right operand
      Returns:
      The result
    • multiply

      public static Object multiply(@Nullable Object left, @Nullable Object right)
      The * operator described in the section 1.7.1 of the specification.
      Parameters:
      left - The left operand
      right - The right operand
      Returns:
      The result
    • divide

      public static Object divide(@Nullable Object left, @Nullable Object right)
      The / operator described in the section 1.7.2 of the specification.
      Parameters:
      left - The left operand
      right - The right operand
      Returns:
      The result
    • mod

      public static Object mod(@Nullable Object left, @Nullable Object right)
      The % operator described in the section 1.7.3 of the specification.
      Parameters:
      left - The left operand
      right - The right operand
      Returns:
      The result
    • negate

      public static Object negate(@Nullable Object value)
      The unary - operator described in the section 1.7.4 of the specification.
      Parameters:
      value - The operand
      Returns:
      The result
    • concat

      public static String concat(@Nullable Object left, @Nullable Object right)
      The += operator described in the section 1.8 of the specification.
      Parameters:
      left - The left operand
      right - The right operand
      Returns:
      The concatenated value