Package io.deephaven.function
Interface ToDoubleFunction<T>
- Type Parameters:
T- the input type
- All Superinterfaces:
ToDoubleFunction<T>,ToPrimitiveFunction<T>,TypedFunction<T>
- 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 ToPrimitiveFunction<T>, ToDoubleFunction<T>
A
double function.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.function.ToPrimitiveFunction
ToPrimitiveFunction.Visitor<T,R> -
Method Summary
Modifier and TypeMethodDescriptiondoubleapplyAsDouble(T value) static <T> ToDoubleFunction<T>cast()Assumes the object value is directly castable to a double.static <T,R> ToDoubleFunction<T> map(Function<? super T, ? extends R> f, ToDoubleFunction<? super R> g) Creates the function compositiong ∘ f.default DoubleTypeThis function's return type.default <R> Rwalk(ToPrimitiveFunction.Visitor<T, R> visitor) Methods inherited from interface io.deephaven.function.ToPrimitiveFunction
walk
-
Method Details
-
cast
Assumes the object value is directly castable to a double. Equivalent tox -> (double)x.- Type Parameters:
T- the value type- Returns:
- the double function
-
map
static <T,R> ToDoubleFunction<T> map(Function<? super T, ? extends R> f, ToDoubleFunction<? super R> g) Creates the function compositiong ∘ f.Equivalent to
x -> g.applyAsDouble(f.apply(x)).- Type Parameters:
T- the input typeR- the intermediate type- Parameters:
f- the inner functiong- the outer function- Returns:
- the double function
-
applyAsDouble
- Specified by:
applyAsDoublein interfaceToDoubleFunction<T>
-
returnType
Description copied from interface:TypedFunctionThis function's return type.- Specified by:
returnTypein interfaceToPrimitiveFunction<T>- Specified by:
returnTypein interfaceTypedFunction<T>- Returns:
- the type
-
walk
- Specified by:
walkin interfaceToPrimitiveFunction<T>
-