@FunctionalInterface public interface LOiToLongFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OiFunction<T,aType.aLong>, Codomain<aType.aLong>, Domain2<aType.a<T>,aType.aInt>
Non-throwing functional interface (lambda) LOiToLongFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,int a2
Co-domain: long
Special case of function that corresponds to expressions like (list, index) -> List::get
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LOiToLongFunction.LIntObjToLongFunc<T>
Permutation of LOiToLongFunction for method references.
|
static class |
LOiToLongFunction.LOiToLongFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> LOiToLongFunction<T> |
apply1stAsLong(LToLongFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LOiToLongFunction<T> |
apply2ndAsLong(LIntToLongFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default long |
applyAsLong(T a1,
int a2) |
default long |
applyAsLong(T a1,
int a2,
ExWF<RuntimeException> exF) |
default long |
applyAsLong(T a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default long |
applyAsLongThen(T a1,
int a2,
LToLongFunction<Throwable> handler) |
long |
applyAsLongX(T a1,
int a2)
Implement this, but call applyAsLong(T a1,int a2)
|
static <T> long |
call(T a1,
int a2,
LOiToLongFunction<T> lambda) |
default LLongSupplier |
capture(T a1,
int a2)
Captures arguments but delays the evaluation.
|
default <V2> LOiToLongFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LOiToLongFunction<V2> |
cast(LOiToLongFunction<T> function)
Cast that replace generics.
|
default <V1> LOiToLongFunction<V1> |
compose(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LOiToLongFunction<V1> |
composed(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2,
LOiToLongFunction<T> after) |
static <V1,V2,T> LToLongBiFunction<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2,
LOiToLongFunction<T> after) |
static <T> LOiToLongFunction<T> |
constant(long r)
Creates function that always returns the same value.
|
static <T> LOiToLongFunction<T> |
failSafe(LOiToLongFunction<T> func,
LOiToLongFunction<T> failSafe) |
default long |
failSafeApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> failSafe) |
static <T> long |
failSafeApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
LOiToLongFunction<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LLongConsumer 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,
LOiToLongFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_a2,
int max_a2,
T a1,
LOiToLongFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LOiToLongFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default long |
handlingApplyAsLong(T a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> long |
handlingApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LOiToLongFunction.LIntObjToLongFunc<T> |
intObjToLongFunc(LOiToLongFunction.LIntObjToLongFunc<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,
LLongConsumer 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,
LLongConsumer 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,
LLongConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LIntToLongFunction |
lShrink(LIntFunction<T> left) |
default LIntToLongFunction |
lShrinkc(T a1) |
static <T> LIntToLongFunction |
lShrinked(LIntFunction<T> left,
LOiToLongFunction<T> func) |
static <T> LIntToLongFunction |
lShrinkedc(T a1,
LOiToLongFunction<T> func) |
default long |
nestingApplyAsLong(T a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default long |
nonNullApplyAsLong(T a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LOiToLongFunction<T> |
oiToLongFunc(LOiToLongFunction<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> LToLongBiFunction<V1,V2> |
oiToLongFuncCompose(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LOiToLongFunction<T> |
oiToLongFuncThrowing(ExF<Throwable> exF) |
static <T> LOiToLongFunction<T> |
oiToLongFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> long |
produceLong(int a2,
T a1)
Does nothing (LOiToLongFunction.LIntObjToLongFunc) Function
|
static <T> long |
produceLong(T a1,
int a2)
Does nothing (LOiToLongFunction) Function
|
static <T> LOiToLongFunction<T> |
recursive(LFunction<LOiToLongFunction<T>,LOiToLongFunction<T>> selfLambda) |
default LToLongFunction<T> |
rShrink(LToIntFunction<T> right) |
default LToLongFunction<T> |
rShrinkc(int a2) |
static <T> LToLongFunction<T> |
rShrinked(LToIntFunction<T> right,
LOiToLongFunction<T> func) |
static <T> LToLongFunction<T> |
rShrinkedc(int a2,
LOiToLongFunction<T> func) |
static <T> LOiToLongFunction<T> |
safe()
Safe instance.
|
static <T> LOiToLongFunction<T> |
safe(LOiToLongFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LOiToLongFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LOiToLongFunction<T>> |
safeSupplier(LSupplier<LOiToLongFunction<T>> supplier)
Safe supplier.
|
default long |
shovingApplyAsLong(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(LLongFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjIntPredicate<T> |
thenToBool(LLongPredicate after)
Combines two functions together in a order.
|
default LOiToByteFunction<T> |
thenToByte(LLongToByteFunction after)
Combines two functions together in a order.
|
default LOiToCharFunction<T> |
thenToChar(LLongToCharFunction after)
Combines two functions together in a order.
|
default LOiToDblFunction<T> |
thenToDbl(LLongToDblFunction after)
Combines two functions together in a order.
|
default LOiToFltFunction<T> |
thenToFlt(LLongToFltFunction after)
Combines two functions together in a order.
|
default LOiToIntFunction<T> |
thenToInt(LLongToIntFunction after)
Combines two functions together in a order.
|
default LOiToLongFunction<T> |
thenToLong(LLongUnaryOperator after)
Combines two functions together in a order.
|
default LOiToSrtFunction<T> |
thenToSrt(LLongToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_a2,
T a1,
LOiToLongFunction<T> func)
From-To.
|
static <T> long |
tryApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func) |
static <T> long |
tryApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> long |
tryApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> long |
tryApplyAsLongThen(T a1,
int a2,
LOiToLongFunction<T> func,
LToLongFunction<Throwable> handler) |
default LOiToLongFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LOiToLongFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LOiToLongFunction<T> |
tryingThen(LToLongFunction<Throwable> handler) |
default long |
tupleApplyAsLong(LObjIntPair<T> args) |
static <T> LOiToLongFunction<T> |
uncurry(LFunction<T,LIntToLongFunction> func) |
default LOiToLongFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default long applyAsLong(T a1, int a2)
long applyAsLongX(T a1, int a2) throws Throwable
Implement this, but call applyAsLong(T a1,int a2)
Throwabledefault long tupleApplyAsLong(LObjIntPair<T> args)
default long handlingApplyAsLong(T a1, int a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LOiToLongFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default long applyAsLong(T a1, int a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LOiToLongFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default long applyAsLong(T a1, int a2, @Nonnull ExWF<RuntimeException> exF)
default LOiToLongFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default long applyAsLongThen(T a1, int a2, @Nonnull LToLongFunction<Throwable> handler)
default LOiToLongFunction<T> tryingThen(@Nonnull LToLongFunction<Throwable> handler)
default long nestingApplyAsLong(T a1, int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default long shovingApplyAsLong(T a1, int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> long handlingApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> long tryApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func)
static <T> long tryApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> long tryApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> long tryApplyAsLongThen(T a1,
int a2,
LOiToLongFunction<T> func,
@Nonnull
LToLongFunction<Throwable> handler)
default long failSafeApplyAsLong(T a1, int a2, @Nonnull LOiToLongFunction<T> failSafe)
static <T> long failSafeApplyAsLong(T a1,
int a2,
LOiToLongFunction<T> func,
@Nonnull
LOiToLongFunction<T> failSafe)
static <T> LOiToLongFunction<T> failSafe(LOiToLongFunction<T> func, @Nonnull LOiToLongFunction<T> failSafe)
default long nonNullApplyAsLong(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,
LOiToLongFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_a2,
int max_a2,
T a1,
LOiToLongFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_a2,
T a1,
LOiToLongFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LIntToLongFunction lShrink(LIntFunction<T> left)
default LIntToLongFunction lShrinkc(T a1)
static <T> LIntToLongFunction lShrinked(LIntFunction<T> left, LOiToLongFunction<T> func)
static <T> LIntToLongFunction lShrinkedc(T a1, LOiToLongFunction<T> func)
default LToLongFunction<T> rShrink(LToIntFunction<T> right)
default LToLongFunction<T> rShrinkc(int a2)
static <T> LToLongFunction<T> rShrinked(LToIntFunction<T> right, LOiToLongFunction<T> func)
static <T> LToLongFunction<T> rShrinkedc(int a2, LOiToLongFunction<T> func)
static <T> LOiToLongFunction<T> uncurry(LFunction<T,LIntToLongFunction> func)
default LOiToLongFunction untyped()
Cast that removes generics.
default <V2> LOiToLongFunction<V2> cast()
Cast that replace generics.
static <V2,T> LOiToLongFunction<V2> cast(LOiToLongFunction<T> function)
Cast that replace generics.
default LLongSupplier capture(T a1, int a2)
Captures arguments but delays the evaluation.
static <T> LOiToLongFunction<T> constant(long r)
Creates function that always returns the same value.
@Nonnull static <T> LOiToLongFunction<T> apply1stAsLong(@Nonnull LToLongFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LOiToLongFunction<T> apply2ndAsLong(@Nonnull LIntToLongFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LOiToLongFunction<T> oiToLongFunc(@Nonnull LOiToLongFunction<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> LOiToLongFunction<T> recursive(@Nonnull LFunction<LOiToLongFunction<T>,LOiToLongFunction<T>> selfLambda)
@Nonnull static <T> LOiToLongFunction<T> oiToLongFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LOiToLongFunction<T> oiToLongFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LOiToLongFunction.LIntObjToLongFunc<T> intObjToLongFunc(@Nonnull LOiToLongFunction.LIntObjToLongFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> long call(T a1,
int a2,
@Nonnull
LOiToLongFunction<T> lambda)
@Nonnull static <T> LOiToLongFunction<T> safe()
Safe instance. That always returns the same value (as produceLong).
@Nonnull static <T> LSupplier<LOiToLongFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LOiToLongFunction<T> safe(@Nullable LOiToLongFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LOiToLongFunction<T>> safeSupplier(@Nullable LSupplier<LOiToLongFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LOiToLongFunction<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LOiToLongFunction<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2, LOiToLongFunction<T> after)
@Nonnull default <V1,V2> LToLongBiFunction<V1,V2> oiToLongFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LToLongBiFunction<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2, LOiToLongFunction<T> after)
@Nonnull default <V> LOiFunction<T,V> then(@Nonnull LLongFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LOiToByteFunction<T> thenToByte(@Nonnull LLongToByteFunction after)
Combines two functions together in a order.
@Nonnull default LOiToSrtFunction<T> thenToSrt(@Nonnull LLongToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LOiToIntFunction<T> thenToInt(@Nonnull LLongToIntFunction after)
Combines two functions together in a order.
@Nonnull default LOiToLongFunction<T> thenToLong(@Nonnull LLongUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LOiToFltFunction<T> thenToFlt(@Nonnull LLongToFltFunction after)
Combines two functions together in a order.
@Nonnull default LOiToDblFunction<T> thenToDbl(@Nonnull LLongToDblFunction after)
Combines two functions together in a order.
@Nonnull default LOiToCharFunction<T> thenToChar(@Nonnull LLongToCharFunction after)
Combines two functions together in a order.
@Nonnull default LObjIntPredicate<T> thenToBool(@Nonnull LLongPredicate after)
Combines two functions together in a order.
static <T> long produceLong(T a1,
int a2)
Does nothing (LOiToLongFunction) Function
static <T> long produceLong(int a2,
T a1)
Does nothing (LOiToLongFunction.LIntObjToLongFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LLongConsumer 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, LLongConsumer 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, LLongConsumer 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, LLongConsumer 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.