Package zone.lamprey.function
Interface DoubleFunction<R>
- Type Parameters:
R- the type of the result of the function
- All Superinterfaces:
DoubleFunction<R>,Function<Double,R>,Function<Double,R>
- All Known Subinterfaces:
DoublePredicate,DoubleToIntFunction,DoubleToLongFunction,DoubleUnaryOperator
- 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 DoubleFunction<R> extends Function<Double,R>, DoubleFunction<R>
Represents a function that accepts a double-valued argument and produces a
result. This is the
double-consuming primitive specialization for
Function.
This is a functional interface whose
functional method is apply(double).
- Since:
- 1.8
- See Also:
Function
-
Field Summary
Fields Modifier and Type Field Description static DoubleFunction<String>TO_STRINGFunctional interface toString.valueOf(double) -
Method Summary
Modifier and Type Method Description Rapply(double value)Applies this function to the given argument.default Rapply(Double t)Applies this function to the given argument.default Supplier<R>applyPartial(double t)Partially apply a parameter such that a single param function becomes a no-param supplier.default DoubleConsumerconsume(Consumer<R> consumer)Consume a function.static DoubleUnaryOperatoridentity()Returns a unary operator that always returns its input argument.default <S> DoubleFunction<S>map(Function<? super R,? extends S> functor)Lift a function.default DoubleUnaryOperatormapToDouble(ToDoubleFunction<? super R> functor)Lift a function.default DoubleToIntFunctionmapToInt(ToIntFunction<? super R> functor)Lift a function.default DoubleToLongFunctionmapToLong(ToLongFunction<? super R> functor)Lift a function.default DoublePredicatemapToPredicate(Predicate<? super R> functor)Lift a function.
-
Field Details
-
TO_STRING
Functional interface toString.valueOf(double)
-
-
Method Details
-
apply
Applies this function to the given argument.- Specified by:
applyin interfaceDoubleFunction<R>- Parameters:
value- the function argument- Returns:
- the function result
-
apply
Applies this function to the given argument. -
applyPartial
Partially apply a parameter such that a single param function becomes a no-param supplier.- Parameters:
t- The parameter to apply.- Returns:
- A partially-applied function.
-
consume
Consume a function. -
map
Lift a function. -
mapToPredicate
Lift a function.- Specified by:
mapToPredicatein interfaceFunction<Double,R>- 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.
-
mapToDouble
Lift a function.- Specified by:
mapToDoublein interfaceFunction<Double,R>- 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.
-
mapToInt
Lift a function. -
mapToLong
Lift a function. -
identity
Returns a unary operator that always returns its input argument.- Returns:
- a unary operator that always returns its input argument
-