@FunctionalInterface public interface LDblFunction<R> extends java.util.function.DoubleFunction<R>, MetaFunction, MetaInterface.NonThrowing, Codomain<aType.a<R>>, Domain1<aType.aDouble>
Non-throwing functional interface (lambda) LDblFunction for Java 8.
Type: function
Domain (lvl: 1): double a
Co-domain: R
| Modifier and Type | Interface and Description |
|---|---|
static class |
LDblFunction.LDblFunctionSingle<R> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
static LSupplier<String> |
NULL_VALUE_MESSAGE_SUPPLIER |
| Modifier and Type | Method and Description |
|---|---|
default LDblFunction<R> |
after(LConsumer<? super R> after) |
default R |
apply(double a) |
default R |
apply(double a,
ExWF<RuntimeException> exF) |
default R |
apply(double a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default R |
applyThen(double a,
LFunction<Throwable,R> handler) |
R |
applyX(double a)
Implement this, but call apply(double a)
|
default LDblFunction<R> |
before(LDblConsumer before) |
static <R> R |
call(double a,
LDblFunction<R> lambda) |
default LSupplier<R> |
capture(double a)
Captures arguments but delays the evaluation.
|
default <V2> LDblFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,R> LDblFunction<V2> |
cast(LDblFunction<R> function)
Cast that replace generics.
|
default LDblFunction<R> |
compose(LDblUnaryOperator before)
Allows to manipulate the domain of the function.
|
static <R> LDblFunction<R> |
composed(LDblUnaryOperator before,
LDblFunction<R> after) |
static <V,R> LFunction<V,R> |
composed(LToDblFunction<? super V> before,
LDblFunction<R> after) |
static <R> LDblFunction<R> |
constant(R r)
Creates function that always returns the same value.
|
static <R> LDblFunction<R> |
dblFunc(LDblFunction<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LFunction<V,R> |
dblFuncCompose(LToDblFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static <R> LDblFunction<R> |
dblFuncThrowing(ExF<Throwable> exF) |
static <R> LDblFunction<R> |
dblFuncThrowing(String message,
ExMF<Throwable> exF) |
static <R> LDblFunction<R> |
failSafe(LDblFunction<R> func,
LDblFunction<R> failSafe) |
default R |
failSafeApply(double a,
LDblFunction<R> failSafe) |
static <R> R |
failSafeApply(double a,
LDblFunction<R> func,
LDblFunction<R> failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.aDouble> ia,
C0 source,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <R> void |
fromTill(int min_i,
int max_i,
double a,
LDblFunction<R> func)
From-To.
|
static <R> void |
fromTo(int min_i,
int max_i,
double a,
LDblFunction<R> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LDblFunction<R> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default R |
handlingApply(double a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <R> R |
handlingApply(double a,
LDblFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.aDouble> sa,
C0 source,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default R |
nestingApply(double a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LDblFunction<R> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default R |
nonNullApply(double a)
Function call that ensures the result is not null
|
static <R> R |
produce(double a)
Does nothing (LDblFunction) Function
|
static <R> LDblFunction<R> |
recursive(LFunction<LDblFunction<R>,LDblFunction<R>> selfLambda) |
static <R> LDblFunction<R> |
safe()
Safe instance.
|
static <R> LDblFunction<R> |
safe(LDblFunction<R> other)
Safe wrapping.
|
static <R> LSupplier<LDblFunction<R>> |
safeSupplier()
Safe instance supplier.
|
static <R> LSupplier<LDblFunction<R>> |
safeSupplier(LSupplier<LDblFunction<R>> supplier)
Safe supplier.
|
default R |
shovingApply(double a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LDblFunction<V> |
then(LFunction<? super R,? extends V> after)
Combines two functions together in a order.
|
default LDblConsumer |
thenConsume(LConsumer<? super R> after)
Combines two functions together in a order.
|
default LDblPredicate |
thenToBool(LPredicate<? super R> after)
Combines two functions together in a order.
|
default LDblToByteFunction |
thenToByte(LToByteFunction<? super R> after)
Combines two functions together in a order.
|
default LDblToCharFunction |
thenToChar(LToCharFunction<? super R> after)
Combines two functions together in a order.
|
default LDblUnaryOperator |
thenToDbl(LToDblFunction<? super R> after)
Combines two functions together in a order.
|
default LDblToFltFunction |
thenToFlt(LToFltFunction<? super R> after)
Combines two functions together in a order.
|
default LDblToIntFunction |
thenToInt(LToIntFunction<? super R> after)
Combines two functions together in a order.
|
default LDblToLongFunction |
thenToLong(LToLongFunction<? super R> after)
Combines two functions together in a order.
|
default LDblToSrtFunction |
thenToSrt(LToSrtFunction<? super R> after)
Combines two functions together in a order.
|
static <R> void |
times(int max_i,
double a,
LDblFunction<R> func)
From-To.
|
static <R> R |
tryApply(double a,
LDblFunction<R> func) |
static <R> R |
tryApply(double a,
LDblFunction<R> func,
ExWF<RuntimeException> exF) |
static <R> R |
tryApply(double a,
LDblFunction<R> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <R> R |
tryApplyThen(double a,
LDblFunction<R> func,
LFunction<Throwable,R> handler) |
default LDblFunction<R> |
trying(ExWF<RuntimeException> exF) |
default LDblFunction<R> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LDblFunction<R> |
tryingThen(LFunction<Throwable,R> handler) |
default R |
tupleApply(LDblSingle args) |
default LDblFunction |
untyped()
Cast that removes generics.
|
static <R> LDblFunction<R> |
wrap(java.util.function.DoubleFunction<R> other)
Wraps JRE instance.
|
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
@Nullable default R apply(double a)
apply in interface java.util.function.DoubleFunction<R>R applyX(double a) throws Throwable
Implement this, but call apply(double a)
Throwabledefault R tupleApply(LDblSingle args)
default R handlingApply(double a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LDblFunction<R> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default R apply(double a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LDblFunction<R> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default R apply(double a, @Nonnull ExWF<RuntimeException> exF)
default LDblFunction<R> trying(@Nonnull ExWF<RuntimeException> exF)
default R nestingApply(double a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default R shovingApply(double a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <R> R handlingApply(double a,
LDblFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <R> R tryApply(double a,
LDblFunction<R> func)
static <R> R tryApply(double a,
LDblFunction<R> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <R> R tryApply(double a,
LDblFunction<R> func,
@Nonnull
ExWF<RuntimeException> exF)
static <R> R tryApplyThen(double a,
LDblFunction<R> func,
@Nonnull
LFunction<Throwable,R> handler)
default R failSafeApply(double a, @Nonnull LDblFunction<R> failSafe)
static <R> R failSafeApply(double a,
LDblFunction<R> func,
@Nonnull
LDblFunction<R> failSafe)
static <R> LDblFunction<R> failSafe(LDblFunction<R> func, @Nonnull LDblFunction<R> failSafe)
@Nonnull default R nonNullApply(double a)
Function call that ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <R> void fromTo(int min_i,
int max_i,
double a,
LDblFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void fromTill(int min_i,
int max_i,
double a,
LDblFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void times(int max_i,
double a,
LDblFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
default LDblFunction untyped()
Cast that removes generics.
default <V2> LDblFunction<V2> cast()
Cast that replace generics.
static <V2,R> LDblFunction<V2> cast(LDblFunction<R> function)
Cast that replace generics.
static <R> LDblFunction<R> constant(R r)
Creates function that always returns the same value.
@Nonnull static <R> LDblFunction<R> dblFunc(@Nonnull LDblFunction<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <R> LDblFunction<R> recursive(@Nonnull LFunction<LDblFunction<R>,LDblFunction<R>> selfLambda)
@Nonnull static <R> LDblFunction<R> dblFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <R> LDblFunction<R> dblFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <R> R call(double a,
@Nonnull
LDblFunction<R> lambda)
@Nonnull static <R> LDblFunction<R> wrap(java.util.function.DoubleFunction<R> other)
Wraps JRE instance.
@Nonnull static <R> LDblFunction<R> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <R> LSupplier<LDblFunction<R>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <R> LDblFunction<R> safe(@Nullable LDblFunction<R> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <R> LSupplier<LDblFunction<R>> safeSupplier(@Nullable LSupplier<LDblFunction<R>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LDblFunction<R> compose(@Nonnull LDblUnaryOperator before)
Allows to manipulate the domain of the function.
static <R> LDblFunction<R> composed(@Nonnull LDblUnaryOperator before, LDblFunction<R> after)
@Nonnull default <V> LFunction<V,R> dblFuncCompose(@Nonnull LToDblFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V,R> LFunction<V,R> composed(@Nonnull LToDblFunction<? super V> before, LDblFunction<R> after)
@Nonnull default <V> LDblFunction<V> then(@Nonnull LFunction<? super R,? extends V> after)
Combines two functions together in a order.
@Nonnull default LDblConsumer thenConsume(@Nonnull LConsumer<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblFunction<R> before(@Nonnull LDblConsumer before)
@Nonnull default LDblToByteFunction thenToByte(@Nonnull LToByteFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblToSrtFunction thenToSrt(@Nonnull LToSrtFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblToIntFunction thenToInt(@Nonnull LToIntFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblToLongFunction thenToLong(@Nonnull LToLongFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblToFltFunction thenToFlt(@Nonnull LToFltFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblUnaryOperator thenToDbl(@Nonnull LToDblFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblToCharFunction thenToChar(@Nonnull LToCharFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblPredicate thenToBool(@Nonnull LPredicate<? super R> after)
Combines two functions together in a order.
@Nonnull default LDblFunction<R> nonNullable()
Converts to function that makes sure that the result is not null.
static <R> R produce(double a)
Does nothing (LDblFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.aDouble> ia, C0 source, LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C0,I0> void iterate(SequentialRead<C0,I0,aType.aDouble> sa, C0 source, LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
Copyright © 2019. All rights reserved.