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 ofoperandandthis.default Comparator<T>Returns aComparatorthat orders objects using the double values mapped by this function.default BuildableComparableFunction<T,Double> boxed()default BuildableToDoubleFunction<T>Returns a function that decrementsthisby one.default BuildableToDoubleFunction<T>divide(double divisor) Returns a function that calculates the quotient ofthisanddivisor.default BuildableToDoubleFunction<T>Returns a function that incrementsthisby one.default BuildablePredicate<T>is(double test) Returns a predicate that tests the value generated bythisfor equality with the supplied constant.default BuildablePredicate<T>isGreaterThan(double test) Returns a predicate that tests the value generated bythisto see if it is greater than the supplied constant.default BuildablePredicate<T>isGreaterThanOrEqualTo(double test) Returns a predicate that tests the value generated bythisto 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 bythisto see if it is less than the supplied constant.default BuildablePredicate<T>isLessThanOrEqualTo(double test) Returns a predicate that tests the value generated bythisto 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 ofthisandmultiplier.default BuildableToDoubleFunction<T>subtract(double operand) Returns a function that subtractsoperandfromthis.Methods inherited from interface java.util.function.ToDoubleFunction
applyAsDouble
-
Method Details
-
add
Returns a function that calculates the sum ofoperandandthis.- Parameters:
operand- the value to add- Returns:
- a summing function
-
subtract
Returns a function that subtractsoperandfromthis.- Parameters:
operand- the value to subtract- Returns:
- a subtracting function
-
increment
Returns a function that incrementsthisby one.- Returns:
- an incrementing function
-
decrement
Returns a function that decrementsthisby one.- Returns:
- a decrementing function
-
multiply
Returns a function that calculates the product ofthisandmultiplier.- Parameters:
multiplier- the multiplier- Returns:
- a multiplying function
-
divide
Returns a function that calculates the quotient ofthisanddivisor.- Parameters:
divisor- the divisor- Returns:
- a dividing function
-
is
Returns a predicate that tests the value generated bythisfor 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 bythisto 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 bythisto 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 bythisto 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 bythisto 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 aComparatorthat orders objects using the double values mapped by this function.- Returns:
- a comparator that orders using the mapped values
-
boxed
-