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