Interface DoubleBinaryOperator

All Superinterfaces:
BiFunction<Double,​Double,​Double>, BiFunction<Double,​Double,​Double>, BinaryOperator<Double>, BinaryOperator<Double>, DoubleBinaryOperator
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 DoubleBinaryOperator
extends BinaryOperator<Double>, DoubleBinaryOperator
Represents an operation upon two double-valued operands and producing a double-valued result. This is the primitive type specialization of BinaryOperator for double.

This is a functional interface whose functional method is applyAsDouble(double, double).

Since:
1.8
See Also:
BinaryOperator, DoubleUnaryOperator
  • Field Details

  • Method Details

    • applyAsDouble

      double applyAsDouble​(double left, double right)
      Applies this operator to the given operands.
      Specified by:
      applyAsDouble in interface DoubleBinaryOperator
      Parameters:
      left - the first operand
      right - the second operand
      Returns:
      the operator result
    • apply

      default Double apply​(Double t, Double u)
      Applies this function to the given arguments.
      Specified by:
      apply in interface BiFunction<Double,​Double,​Double>
      Specified by:
      apply in interface BiFunction<Double,​Double,​Double>
      Parameters:
      t - the first function argument
      u - the second function argument
      Returns:
      the function result
    • applyPartial

      default DoubleSupplier applyPartial​(double t, double u)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      t - the first function argument
      u - the second function argument
      Returns:
      the function result
    • applyPartialL

      default DoubleUnaryOperator applyPartialL​(double t)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      t - the function argument
      Returns:
      the function result
    • applyPartialR

      default DoubleUnaryOperator applyPartialR​(double u)
      Performs a partial application, resulting in a function that calls this with its argument and the argument given here.
      Parameters:
      u - the function argument
      Returns:
      the function result
    • consume

      default ObjDoubleConsumer<Double> consume​(DoubleConsumer consumer)
      Consume a function.
      Parameters:
      consumer - The consumer to use in consuming.
      Returns:
      A Consumer which passes it's argument to this function and then passes the result into the given consumer.
    • map

      default DoubleBinaryOperator map​(DoubleUnaryOperator functor)
      Lift a function.
      Parameters:
      functor - The function to use in lifting.
      Returns:
      A function that passes the result of fn through a functor to produce a lifted function.