@FunctionalInterface public interface LOiToIntFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OiFunction<T,aType.aInt>, Codomain<aType.aInt>, Domain2<aType.a<T>,aType.aInt>
Non-throwing functional interface (lambda) LOiToIntFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,int a2
Co-domain: int
Special case of function that corresponds to expressions like (list, index) -> List::get
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LOiToIntFunction.LIntObjToIntFunc<T>
Permutation of LOiToIntFunction for method references.
|
static class |
LOiToIntFunction.LOiToIntFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> LOiToIntFunction<T> |
apply1stAsInt(LToIntFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LOiToIntFunction<T> |
apply2ndAsInt(LIntUnaryOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default int |
applyAsInt(T a1,
int a2) |
default int |
applyAsInt(T a1,
int a2,
ExWF<RuntimeException> exF) |
default int |
applyAsInt(T a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default int |
applyAsIntThen(T a1,
int a2,
LToIntFunction<Throwable> handler) |
int |
applyAsIntX(T a1,
int a2)
Implement this, but call applyAsInt(T a1,int a2)
|
static <T> int |
call(T a1,
int a2,
LOiToIntFunction<T> lambda) |
default LIntSupplier |
capture(T a1,
int a2)
Captures arguments but delays the evaluation.
|
default <V2> LOiToIntFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LOiToIntFunction<V2> |
cast(LOiToIntFunction<T> function)
Cast that replace generics.
|
default <V1> LOiToIntFunction<V1> |
compose(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LOiToIntFunction<V1> |
composed(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2,
LOiToIntFunction<T> after) |
static <V1,V2,T> LToIntBiFunction<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2,
LOiToIntFunction<T> after) |
static <T> LOiToIntFunction<T> |
constant(int r)
Creates function that always returns the same value.
|
static <T> LOiToIntFunction<T> |
failSafe(LOiToIntFunction<T> func,
LOiToIntFunction<T> failSafe) |
default int |
failSafeApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> failSafe) |
static <T> int |
failSafeApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
LOiToIntFunction<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T> void |
fromTill(int min_a2,
int max_a2,
T a1,
LOiToIntFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_a2,
int max_a2,
T a1,
LOiToIntFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LOiToIntFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default int |
handlingApplyAsInt(T a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> int |
handlingApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LOiToIntFunction.LIntObjToIntFunc<T> |
intObjToIntFunc(LOiToIntFunction.LIntObjToIntFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aInt> sa2,
C2 source2,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2> void |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2,I2> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.aInt> sa2,
C2 source2,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LIntUnaryOperator |
lShrink(LIntFunction<T> left) |
default LIntUnaryOperator |
lShrinkc(T a1) |
static <T> LIntUnaryOperator |
lShrinked(LIntFunction<T> left,
LOiToIntFunction<T> func) |
static <T> LIntUnaryOperator |
lShrinkedc(T a1,
LOiToIntFunction<T> func) |
default int |
nestingApplyAsInt(T a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default int |
nonNullApplyAsInt(T a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LOiToIntFunction<T> |
oiToIntFunc(LOiToIntFunction<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V1,V2> LToIntBiFunction<V1,V2> |
oiToIntFuncCompose(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LOiToIntFunction<T> |
oiToIntFuncThrowing(ExF<Throwable> exF) |
static <T> LOiToIntFunction<T> |
oiToIntFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> int |
produceInt(int a2,
T a1)
Does nothing (LOiToIntFunction.LIntObjToIntFunc) Function
|
static <T> int |
produceInt(T a1,
int a2)
Does nothing (LOiToIntFunction) Function
|
static <T> LOiToIntFunction<T> |
recursive(LFunction<LOiToIntFunction<T>,LOiToIntFunction<T>> selfLambda) |
default LToIntFunction<T> |
rShrink(LToIntFunction<T> right) |
default LToIntFunction<T> |
rShrinkc(int a2) |
static <T> LToIntFunction<T> |
rShrinked(LToIntFunction<T> right,
LOiToIntFunction<T> func) |
static <T> LToIntFunction<T> |
rShrinkedc(int a2,
LOiToIntFunction<T> func) |
static <T> LOiToIntFunction<T> |
safe()
Safe instance.
|
static <T> LOiToIntFunction<T> |
safe(LOiToIntFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LOiToIntFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LOiToIntFunction<T>> |
safeSupplier(LSupplier<LOiToIntFunction<T>> supplier)
Safe supplier.
|
default int |
shovingApplyAsInt(T a1,
int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LOiFunction<T,V> |
then(LIntFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjIntPredicate<T> |
thenToBool(LIntPredicate after)
Combines two functions together in a order.
|
default LOiToByteFunction<T> |
thenToByte(LIntToByteFunction after)
Combines two functions together in a order.
|
default LOiToCharFunction<T> |
thenToChar(LIntToCharFunction after)
Combines two functions together in a order.
|
default LOiToDblFunction<T> |
thenToDbl(LIntToDblFunction after)
Combines two functions together in a order.
|
default LOiToFltFunction<T> |
thenToFlt(LIntToFltFunction after)
Combines two functions together in a order.
|
default LOiToIntFunction<T> |
thenToInt(LIntUnaryOperator after)
Combines two functions together in a order.
|
default LOiToLongFunction<T> |
thenToLong(LIntToLongFunction after)
Combines two functions together in a order.
|
default LOiToSrtFunction<T> |
thenToSrt(LIntToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_a2,
T a1,
LOiToIntFunction<T> func)
From-To.
|
static <T> int |
tryApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func) |
static <T> int |
tryApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> int |
tryApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> int |
tryApplyAsIntThen(T a1,
int a2,
LOiToIntFunction<T> func,
LToIntFunction<Throwable> handler) |
default LOiToIntFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LOiToIntFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LOiToIntFunction<T> |
tryingThen(LToIntFunction<Throwable> handler) |
default int |
tupleApplyAsInt(LObjIntPair<T> args) |
static <T> LOiToIntFunction<T> |
uncurry(LFunction<T,LIntUnaryOperator> func) |
default LOiToIntFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default int applyAsInt(T a1, int a2)
int applyAsIntX(T a1, int a2) throws Throwable
Implement this, but call applyAsInt(T a1,int a2)
Throwabledefault int tupleApplyAsInt(LObjIntPair<T> args)
default int handlingApplyAsInt(T a1, int a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LOiToIntFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default int applyAsInt(T a1, int a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LOiToIntFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default int applyAsInt(T a1, int a2, @Nonnull ExWF<RuntimeException> exF)
default LOiToIntFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default int applyAsIntThen(T a1, int a2, @Nonnull LToIntFunction<Throwable> handler)
default LOiToIntFunction<T> tryingThen(@Nonnull LToIntFunction<Throwable> handler)
default int nestingApplyAsInt(T a1, int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default int shovingApplyAsInt(T a1, int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> int handlingApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> int tryApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func)
static <T> int tryApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> int tryApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> int tryApplyAsIntThen(T a1,
int a2,
LOiToIntFunction<T> func,
@Nonnull
LToIntFunction<Throwable> handler)
default int failSafeApplyAsInt(T a1, int a2, @Nonnull LOiToIntFunction<T> failSafe)
static <T> int failSafeApplyAsInt(T a1,
int a2,
LOiToIntFunction<T> func,
@Nonnull
LOiToIntFunction<T> failSafe)
static <T> LOiToIntFunction<T> failSafe(LOiToIntFunction<T> func, @Nonnull LOiToIntFunction<T> failSafe)
default int nonNullApplyAsInt(T a1, int a2)
Just to mirror the method: Ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T> void fromTo(int min_a2,
int max_a2,
T a1,
LOiToIntFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_a2,
int max_a2,
T a1,
LOiToIntFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_a2,
T a1,
LOiToIntFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LIntUnaryOperator lShrink(LIntFunction<T> left)
default LIntUnaryOperator lShrinkc(T a1)
static <T> LIntUnaryOperator lShrinked(LIntFunction<T> left, LOiToIntFunction<T> func)
static <T> LIntUnaryOperator lShrinkedc(T a1, LOiToIntFunction<T> func)
default LToIntFunction<T> rShrink(LToIntFunction<T> right)
default LToIntFunction<T> rShrinkc(int a2)
static <T> LToIntFunction<T> rShrinked(LToIntFunction<T> right, LOiToIntFunction<T> func)
static <T> LToIntFunction<T> rShrinkedc(int a2, LOiToIntFunction<T> func)
static <T> LOiToIntFunction<T> uncurry(LFunction<T,LIntUnaryOperator> func)
default LOiToIntFunction untyped()
Cast that removes generics.
default <V2> LOiToIntFunction<V2> cast()
Cast that replace generics.
static <V2,T> LOiToIntFunction<V2> cast(LOiToIntFunction<T> function)
Cast that replace generics.
default LIntSupplier capture(T a1, int a2)
Captures arguments but delays the evaluation.
static <T> LOiToIntFunction<T> constant(int r)
Creates function that always returns the same value.
@Nonnull static <T> LOiToIntFunction<T> apply1stAsInt(@Nonnull LToIntFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LOiToIntFunction<T> apply2ndAsInt(@Nonnull LIntUnaryOperator func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LOiToIntFunction<T> oiToIntFunc(@Nonnull LOiToIntFunction<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <T> LOiToIntFunction<T> recursive(@Nonnull LFunction<LOiToIntFunction<T>,LOiToIntFunction<T>> selfLambda)
@Nonnull static <T> LOiToIntFunction<T> oiToIntFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LOiToIntFunction<T> oiToIntFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LOiToIntFunction.LIntObjToIntFunc<T> intObjToIntFunc(@Nonnull LOiToIntFunction.LIntObjToIntFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> int call(T a1,
int a2,
@Nonnull
LOiToIntFunction<T> lambda)
@Nonnull static <T> LOiToIntFunction<T> safe()
Safe instance. That always returns the same value (as produceInt).
@Nonnull static <T> LSupplier<LOiToIntFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LOiToIntFunction<T> safe(@Nullable LOiToIntFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LOiToIntFunction<T>> safeSupplier(@Nullable LSupplier<LOiToIntFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LOiToIntFunction<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LOiToIntFunction<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2, LOiToIntFunction<T> after)
@Nonnull default <V1,V2> LToIntBiFunction<V1,V2> oiToIntFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LToIntBiFunction<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2, LOiToIntFunction<T> after)
@Nonnull default <V> LOiFunction<T,V> then(@Nonnull LIntFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LOiToByteFunction<T> thenToByte(@Nonnull LIntToByteFunction after)
Combines two functions together in a order.
@Nonnull default LOiToSrtFunction<T> thenToSrt(@Nonnull LIntToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LOiToIntFunction<T> thenToInt(@Nonnull LIntUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LOiToLongFunction<T> thenToLong(@Nonnull LIntToLongFunction after)
Combines two functions together in a order.
@Nonnull default LOiToFltFunction<T> thenToFlt(@Nonnull LIntToFltFunction after)
Combines two functions together in a order.
@Nonnull default LOiToDblFunction<T> thenToDbl(@Nonnull LIntToDblFunction after)
Combines two functions together in a order.
@Nonnull default LOiToCharFunction<T> thenToChar(@Nonnull LIntToCharFunction after)
Combines two functions together in a order.
@Nonnull default LObjIntPredicate<T> thenToBool(@Nonnull LIntPredicate after)
Combines two functions together in a order.
static <T> int produceInt(T a1,
int a2)
Does nothing (LOiToIntFunction) Function
static <T> int produceInt(int a2,
T a1)
Does nothing (LOiToIntFunction.LIntObjToIntFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LIntConsumer 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 <C1,I1,C2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LIntConsumer 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 <C1,C2,I2> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.aInt> sa2, C2 source2, LIntConsumer 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 <C1,I1,C2,I2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.aInt> sa2, C2 source2, LIntConsumer 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.