@FunctionalInterface public interface LFltFunction<R> extends MetaFunction, MetaInterface.NonThrowing, Codomain<aType.a<R>>, Domain1<aType.aFloat>
Non-throwing functional interface (lambda) LFltFunction for Java 8.
Type: function
Domain (lvl: 1): float a
Co-domain: R
| Modifier and Type | Interface and Description |
|---|---|
static class |
LFltFunction.LFltFunctionSingle<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 LFltFunction<R> |
after(LConsumer<? super R> after) |
default R |
apply(float a) |
default R |
apply(float a,
ExWF<RuntimeException> exF) |
default R |
apply(float a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default R |
applyThen(float a,
LFunction<Throwable,R> handler) |
R |
applyX(float a)
Implement this, but call apply(float a)
|
default LFltFunction<R> |
before(LFltConsumer before) |
static <R> R |
call(float a,
LFltFunction<R> lambda) |
default LSupplier<R> |
capture(float a)
Captures arguments but delays the evaluation.
|
default <V2> LFltFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,R> LFltFunction<V2> |
cast(LFltFunction<R> function)
Cast that replace generics.
|
default LFltFunction<R> |
compose(LFltUnaryOperator before)
Allows to manipulate the domain of the function.
|
static <R> LFltFunction<R> |
composed(LFltUnaryOperator before,
LFltFunction<R> after) |
static <V,R> LFunction<V,R> |
composed(LToFltFunction<? super V> before,
LFltFunction<R> after) |
static <R> LFltFunction<R> |
constant(R r)
Creates function that always returns the same value.
|
static <R> LFltFunction<R> |
failSafe(LFltFunction<R> func,
LFltFunction<R> failSafe) |
default R |
failSafeApply(float a,
LFltFunction<R> failSafe) |
static <R> R |
failSafeApply(float a,
LFltFunction<R> func,
LFltFunction<R> failSafe) |
static <R> LFltFunction<R> |
fltFunc(LFltFunction<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> |
fltFuncCompose(LToFltFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static <R> LFltFunction<R> |
fltFuncThrowing(ExF<Throwable> exF) |
static <R> LFltFunction<R> |
fltFuncThrowing(String message,
ExMF<Throwable> exF) |
default <C0> void |
forEach(IndexedRead<C0,aType.aFloat> 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,
float a,
LFltFunction<R> func)
From-To.
|
static <R> void |
fromTo(int min_i,
int max_i,
float a,
LFltFunction<R> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LFltFunction<R> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default R |
handlingApply(float a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <R> R |
handlingApply(float a,
LFltFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.aFloat> 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(float a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LFltFunction<R> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default R |
nonNullApply(float a)
Function call that ensures the result is not null
|
static <R> R |
produce(float a)
Does nothing (LFltFunction) Function
|
static <R> LFltFunction<R> |
recursive(LFunction<LFltFunction<R>,LFltFunction<R>> selfLambda) |
static <R> LFltFunction<R> |
safe()
Safe instance.
|
static <R> LFltFunction<R> |
safe(LFltFunction<R> other)
Safe wrapping.
|
static <R> LSupplier<LFltFunction<R>> |
safeSupplier()
Safe instance supplier.
|
static <R> LSupplier<LFltFunction<R>> |
safeSupplier(LSupplier<LFltFunction<R>> supplier)
Safe supplier.
|
default R |
shovingApply(float a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LFltFunction<V> |
then(LFunction<? super R,? extends V> after)
Combines two functions together in a order.
|
default LFltConsumer |
thenConsume(LConsumer<? super R> after)
Combines two functions together in a order.
|
default LFltPredicate |
thenToBool(LPredicate<? super R> after)
Combines two functions together in a order.
|
default LFltToByteFunction |
thenToByte(LToByteFunction<? super R> after)
Combines two functions together in a order.
|
default LFltToCharFunction |
thenToChar(LToCharFunction<? super R> after)
Combines two functions together in a order.
|
default LFltToDblFunction |
thenToDbl(LToDblFunction<? super R> after)
Combines two functions together in a order.
|
default LFltUnaryOperator |
thenToFlt(LToFltFunction<? super R> after)
Combines two functions together in a order.
|
default LFltToIntFunction |
thenToInt(LToIntFunction<? super R> after)
Combines two functions together in a order.
|
default LFltToLongFunction |
thenToLong(LToLongFunction<? super R> after)
Combines two functions together in a order.
|
default LFltToSrtFunction |
thenToSrt(LToSrtFunction<? super R> after)
Combines two functions together in a order.
|
static <R> void |
times(int max_i,
float a,
LFltFunction<R> func)
From-To.
|
static <R> R |
tryApply(float a,
LFltFunction<R> func) |
static <R> R |
tryApply(float a,
LFltFunction<R> func,
ExWF<RuntimeException> exF) |
static <R> R |
tryApply(float a,
LFltFunction<R> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <R> R |
tryApplyThen(float a,
LFltFunction<R> func,
LFunction<Throwable,R> handler) |
default LFltFunction<R> |
trying(ExWF<RuntimeException> exF) |
default LFltFunction<R> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LFltFunction<R> |
tryingThen(LFunction<Throwable,R> handler) |
default R |
tupleApply(LFltSingle args) |
default LFltFunction |
untyped()
Cast that removes generics.
|
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
default R tupleApply(LFltSingle args)
default R handlingApply(float a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LFltFunction<R> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default R apply(float a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LFltFunction<R> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default R apply(float a, @Nonnull ExWF<RuntimeException> exF)
default LFltFunction<R> trying(@Nonnull ExWF<RuntimeException> exF)
default R nestingApply(float a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default R shovingApply(float a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <R> R handlingApply(float a,
LFltFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <R> R tryApply(float a,
LFltFunction<R> func)
static <R> R tryApply(float a,
LFltFunction<R> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <R> R tryApply(float a,
LFltFunction<R> func,
@Nonnull
ExWF<RuntimeException> exF)
static <R> R tryApplyThen(float a,
LFltFunction<R> func,
@Nonnull
LFunction<Throwable,R> handler)
default R failSafeApply(float a, @Nonnull LFltFunction<R> failSafe)
static <R> R failSafeApply(float a,
LFltFunction<R> func,
@Nonnull
LFltFunction<R> failSafe)
static <R> LFltFunction<R> failSafe(LFltFunction<R> func, @Nonnull LFltFunction<R> failSafe)
@Nonnull default R nonNullApply(float 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,
float a,
LFltFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void fromTill(int min_i,
int max_i,
float a,
LFltFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void times(int max_i,
float a,
LFltFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
default LFltFunction untyped()
Cast that removes generics.
default <V2> LFltFunction<V2> cast()
Cast that replace generics.
static <V2,R> LFltFunction<V2> cast(LFltFunction<R> function)
Cast that replace generics.
static <R> LFltFunction<R> constant(R r)
Creates function that always returns the same value.
@Nonnull static <R> LFltFunction<R> fltFunc(@Nonnull LFltFunction<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> LFltFunction<R> recursive(@Nonnull LFunction<LFltFunction<R>,LFltFunction<R>> selfLambda)
@Nonnull static <R> LFltFunction<R> fltFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <R> LFltFunction<R> fltFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <R> R call(float a,
@Nonnull
LFltFunction<R> lambda)
@Nonnull static <R> LFltFunction<R> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <R> LSupplier<LFltFunction<R>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <R> LFltFunction<R> safe(@Nullable LFltFunction<R> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <R> LSupplier<LFltFunction<R>> safeSupplier(@Nullable LSupplier<LFltFunction<R>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LFltFunction<R> compose(@Nonnull LFltUnaryOperator before)
Allows to manipulate the domain of the function.
static <R> LFltFunction<R> composed(@Nonnull LFltUnaryOperator before, LFltFunction<R> after)
@Nonnull default <V> LFunction<V,R> fltFuncCompose(@Nonnull LToFltFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V,R> LFunction<V,R> composed(@Nonnull LToFltFunction<? super V> before, LFltFunction<R> after)
@Nonnull default <V> LFltFunction<V> then(@Nonnull LFunction<? super R,? extends V> after)
Combines two functions together in a order.
@Nonnull default LFltConsumer thenConsume(@Nonnull LConsumer<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltFunction<R> before(@Nonnull LFltConsumer before)
@Nonnull default LFltToByteFunction thenToByte(@Nonnull LToByteFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltToSrtFunction thenToSrt(@Nonnull LToSrtFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltToIntFunction thenToInt(@Nonnull LToIntFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltToLongFunction thenToLong(@Nonnull LToLongFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltUnaryOperator thenToFlt(@Nonnull LToFltFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltToDblFunction thenToDbl(@Nonnull LToDblFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltToCharFunction thenToChar(@Nonnull LToCharFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltPredicate thenToBool(@Nonnull LPredicate<? super R> after)
Combines two functions together in a order.
@Nonnull default LFltFunction<R> nonNullable()
Converts to function that makes sure that the result is not null.
static <R> R produce(float a)
Does nothing (LFltFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.aFloat> 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.aFloat> 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.