Interface Operation<L,R,T>

Type Parameters:
L - The class of the left operand.
R - The class of the right operand.
T - The return type of the operation.
All Superinterfaces:
BiFunction<L,R,T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Operation<L,R,T> extends BiFunction<L,R,T>
Represents a pure binary operation that takes two operands of types L and R, performs a calculation, and returns a result of type T.
  • Method Summary

    Modifier and Type
    Method
    Description
    default T
    apply(L l, R r)
     
    calculate(L left, R right)
    Performs the calculation for two given operands.

    Methods inherited from interface java.util.function.BiFunction

    andThen
  • Method Details

    • calculate

      @Contract(pure=true) T calculate(@NotNull L left, @NotNull R right)
      Performs the calculation for two given operands.
      Parameters:
      left - left operand
      right - right operand
      Returns:
      result
    • apply

      default T apply(L l, R r)
      Specified by:
      apply in interface BiFunction<L,R,T>