Package zone.lamprey.function
Interface ToDoubleFunction<T>
- Type Parameters:
T- the type of the input to the function
- All Superinterfaces:
Function<T,Double>,Function<T,Double>,ToDoubleFunction<T>
- All Known Subinterfaces:
DoubleUnaryOperator,IntToDoubleFunction,LongToDoubleFunction
- 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 ToDoubleFunction<T> extends Function<T,Double>, ToDoubleFunction<T>
Represents a function that produces a double-valued result. This is the
double-producing primitive specialization for Function.
This is a functional interface whose
functional method is applyAsDouble(Object).
- Since:
- 1.8
- See Also:
Function
-
Field Summary
-
Method Summary
Modifier and Type Method Description default Doubleapply(T t)Applies this function to the given argument.doubleapplyAsDouble(T value)Applies this function to the given argument.default DoubleSupplierapplyPartial(T t)Partially apply a parameter such that a single param function becomes a no-param supplier.default Consumer<T>consume(DoubleConsumer consumer)Consume a function.default ToDoubleFunction<T>map(DoubleUnaryOperator functor)Lift a function.default ToIntFunction<T>mapToInt(DoubleToIntFunction functor)Lift a function.default ToLongFunction<T>mapToLong(DoubleToLongFunction functor)Lift a function.default <S> Function<T,S>mapToObj(DoubleFunction<? extends S> functor)Lift a function.default Predicate<T>mapToPredicate(DoublePredicate functor)Lift a function.Methods inherited from interface zone.lamprey.function.Function
consume, map, mapToDouble, mapToInt, mapToLong, mapToPredicate
-
Method Details
-
applyAsDouble
Applies this function to the given argument.- Specified by:
applyAsDoublein interfaceToDoubleFunction<T>- 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.- Specified by:
applyPartialin interfaceFunction<T,Double>- Parameters:
t- The parameter to apply.- Returns:
- A partially-applied function.
-
consume
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
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.
-
mapToObj
Lift a function.- Type Parameters:
S- The return type.- 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.
-
mapToPredicate
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.
-
mapToInt
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.
-
mapToLong
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.
-