@FunctionalInterface
public interface DoubleOperator2
extends java.util.function.DoubleBinaryOperator
Modifier and Type | Field and Description |
---|---|
static DoubleOperator2 |
DIV
Double operator which returns the division result of two arguments:
a / b |
static DoubleOperator2 |
MINUS
Double operator which returns the difference of two arguments:
a - b |
static DoubleOperator2 |
MOD
Double operator which returns the modulo result of two arguments:
a % b . |
static DoubleOperator2 |
MULT
Double operator which returns the product of two arguments:
a * b |
static DoubleOperator2 |
PLUS
Double operator which returns the sum of two arguments:
a + b . |
static DoubleOperator2 |
POWER
Double operator which returns the first argument to the power given by the second argument:
a ^ b |
Modifier and Type | Method and Description |
---|---|
default DoubleOperator2 |
andThen(DoubleOperator1 after)
Create a operator which applies this operator and feeds the result into the next operator.
|
default DoubleOperator2 |
combine(DoubleOperator1 firstArgHandler,
DoubleOperator1 secondArgHandler)
Use this operator on the results of two other operators.
|
static DoubleOperator2 |
from(java.util.function.DoubleBinaryOperator operator)
Make a standard unary double operator usable as
DoubleOperator2 . |
default DoubleOperator1 |
partialLeft(double argument)
Get a partially applied operator.
|
default DoubleOperator1 |
partialRight(double argument)
Get a partially applied operator.
|
static final DoubleOperator2 PLUS
a + b
.static final DoubleOperator2 MINUS
a - b
static final DoubleOperator2 MULT
a * b
static final DoubleOperator2 DIV
a / b
static final DoubleOperator2 MOD
a % b
.static final DoubleOperator2 POWER
a ^ b
@NotNull default DoubleOperator1 partialLeft(double argument)
argument
- value applied for first argument@NotNull default DoubleOperator1 partialRight(double argument)
argument
- value applied for second argument@NotNull default DoubleOperator2 andThen(@NotNull DoubleOperator1 after)
after
- operator called with the result of this operator@NotNull default DoubleOperator2 combine(@NotNull DoubleOperator1 firstArgHandler, @NotNull DoubleOperator1 secondArgHandler)
Example:
combine(DoubleFunction1.SQUARE, DoubleFunction11.SQUARE).andThen(DoubleFunction1.SQUARE_ROOT)
creates a operator which calculates the length of a 2D vector.
firstArgHandler
- handler for first argumentsecondArgHandler
- handler for second argument@NotNull static DoubleOperator2 from(@NotNull java.util.function.DoubleBinaryOperator operator)
DoubleOperator2
.
This is useful if you want to make use of the extended functionality of this implementation.operator
- operator to be used as a DoubleOperator2
DoubleOperator2
view of the incoming operator, or possibly just a cast if
operator
already has the correct type