Interface BuildableToDoubleFunction<T>
- All Superinterfaces:
ToDoubleFunction<T>
A function of one argument that generates a
double
result, and
supports building derived functional types.-
Method Summary
Modifier and TypeMethodDescriptiondefault BuildableToDoubleFunction<T>
add
(double operand) Returns a function that calculates the sum ofoperand
andthis
.default Comparator<T>
Returns aComparator
that orders objects using the double values mapped by this function.default BuildableComparableFunction<T,
Double> boxed()
default BuildableToDoubleFunction<T>
Returns a function that decrementsthis
by one.default BuildableToDoubleFunction<T>
divide
(double divisor) Returns a function that calculates the quotient ofthis
anddivisor
.default BuildableToDoubleFunction<T>
Returns a function that incrementsthis
by one.default BuildablePredicate<T>
is
(double test) Returns a predicate that tests the value generated bythis
for equality with the supplied constant.default BuildablePredicate<T>
isGreaterThan
(double test) Returns a predicate that tests the value generated bythis
to see if it is greater than the supplied constant.default BuildablePredicate<T>
isGreaterThanOrEqualTo
(double test) Returns a predicate that tests the value generated bythis
to see if it is greater than or equal to the supplied constant.default BuildablePredicate<T>
isLessThan
(double test) Returns a predicate that tests the value generated bythis
to see if it is less than the supplied constant.default BuildablePredicate<T>
isLessThanOrEqualTo
(double test) Returns a predicate that tests the value generated bythis
to see if it is less than or equal to the supplied constant.default BuildableToDoubleFunction<T>
multiply
(double multiplier) Returns a function that calculates the product ofthis
andmultiplier
.default BuildableToDoubleFunction<T>
subtract
(double operand) Returns a function that subtractsoperand
fromthis
.Methods inherited from interface java.util.function.ToDoubleFunction
applyAsDouble
-
Method Details
-
add
Returns a function that calculates the sum ofoperand
andthis
.- Parameters:
operand
- the value to add- Returns:
- a summing function
-
subtract
Returns a function that subtractsoperand
fromthis
.- Parameters:
operand
- the value to subtract- Returns:
- a subtracting function
-
increment
Returns a function that incrementsthis
by one.- Returns:
- an incrementing function
-
decrement
Returns a function that decrementsthis
by one.- Returns:
- a decrementing function
-
multiply
Returns a function that calculates the product ofthis
andmultiplier
.- Parameters:
multiplier
- the multiplier- Returns:
- a multiplying function
-
divide
Returns a function that calculates the quotient ofthis
anddivisor
.- Parameters:
divisor
- the divisor- Returns:
- a dividing function
-
is
Returns a predicate that tests the value generated bythis
for equality with the supplied constant.This method uses the modified
Double.equals(Object)
contract whereDouble.NaN == Double.NaN
.- Parameters:
test
- value to test against- Returns:
- an equality predicate
-
isGreaterThan
Returns a predicate that tests the value generated bythis
to see if it is greater than the supplied constant.- Parameters:
test
- value to test against- Returns:
- a greater than predicate
-
isLessThan
Returns a predicate that tests the value generated bythis
to see if it is less than the supplied constant.- Parameters:
test
- value to test against- Returns:
- a less than predicate
-
isGreaterThanOrEqualTo
Returns a predicate that tests the value generated bythis
to see if it is greater than or equal to the supplied constant.- Parameters:
test
- value to test against- Returns:
- a greater than or equal to predicate
-
isLessThanOrEqualTo
Returns a predicate that tests the value generated bythis
to see if it is less than or equal to the supplied constant.- Parameters:
test
- value to test against- Returns:
- a less than or equal to predicate
-
asComparator
Returns aComparator
that orders objects using the double values mapped by this function.- Returns:
- a comparator that orders using the mapped values
-
boxed
-