@FunctionalInterface public interface LObjLongFunction<T,R> extends MetaFunction, MetaInterface.NonThrowing, Codomain<aType.a<R>>, Domain2<aType.a<T>,aType.aLong>
Non-throwing functional interface (lambda) LObjLongFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,long a2
Co-domain: R
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LObjLongFunction.LLongObjFunc<T,R>
Permutation of LObjLongFunction for method references.
|
static class |
LObjLongFunction.LObjLongFunctionSingle<T,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 LObjLongFunction<T,R> |
after(LConsumer<? super R> after) |
default R |
apply(T a1,
long a2) |
default R |
apply(T a1,
long a2,
ExWF<RuntimeException> exF) |
default R |
apply(T a1,
long a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T,R> LObjLongFunction<T,R> |
apply1st(LFunction<T,R> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T,R> LObjLongFunction<T,R> |
apply2nd(LLongFunction<R> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default R |
applyThen(T a1,
long a2,
LFunction<Throwable,R> handler) |
R |
applyX(T a1,
long a2)
Implement this, but call apply(T a1,long a2)
|
default LObjLongFunction<T,R> |
before(LObjLongConsumer<? super T> before) |
static <T,R> R |
call(T a1,
long a2,
LObjLongFunction<T,R> lambda) |
default LSupplier<R> |
capture(T a1,
long a2)
Captures arguments but delays the evaluation.
|
default <V2,V3> LObjLongFunction<V2,V3> |
cast()
Cast that replace generics.
|
static <V2,V3,T,R> |
cast(LObjLongFunction<T,R> function)
Cast that replace generics.
|
default <V1> LObjLongFunction<V1,R> |
compose(LFunction<? super V1,? extends T> before1,
LLongUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T,R> LObjLongFunction<V1,R> |
composed(LFunction<? super V1,? extends T> before1,
LLongUnaryOperator before2,
LObjLongFunction<T,R> after) |
static <V1,V2,T,R> |
composed(LFunction<? super V1,? extends T> before1,
LToLongFunction<? super V2> before2,
LObjLongFunction<T,R> after) |
static <T,R> LObjLongFunction<T,R> |
constant(R r)
Creates function that always returns the same value.
|
static <T,R> LObjLongFunction<T,R> |
failSafe(LObjLongFunction<T,R> func,
LObjLongFunction<T,R> failSafe) |
default R |
failSafeApply(T a1,
long a2,
LObjLongFunction<T,R> failSafe) |
static <T,R> R |
failSafeApply(T a1,
long a2,
LObjLongFunction<T,R> func,
LObjLongFunction<T,R> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aLong> ia2,
C2 source2,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T,R> void |
fromTill(long min_a2,
long max_a2,
T a1,
LObjLongFunction<T,R> func)
From-To.
|
static <T,R> void |
fromTo(long min_a2,
long max_a2,
T a1,
LObjLongFunction<T,R> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LObjLongFunction<T,R> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default R |
handlingApply(T a1,
long a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T,R> R |
handlingApply(T a1,
long a2,
LObjLongFunction<T,R> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C1,C2,I2> void |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.aLong> sa2,
C2 source2,
LConsumer<? super R> 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.aLong> ia2,
C2 source2,
LConsumer<? super R> 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.aLong> sa2,
C2 source2,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T,R> LObjLongFunction.LLongObjFunc<T,R> |
longObjFunc(LObjLongFunction.LLongObjFunc<T,R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default LLongFunction<R> |
lShrink(LLongFunction<T> left) |
default LLongFunction<R> |
lShrinkc(T a1) |
static <R,T> LLongFunction<R> |
lShrinked(LLongFunction<T> left,
LObjLongFunction<T,R> func) |
static <R,T> LLongFunction<R> |
lShrinkedc(T a1,
LObjLongFunction<T,R> func) |
default R |
nestingApply(T a1,
long a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LObjLongFunction<T,R> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default R |
nonNullApply(T a1,
long a2)
Function call that ensures the result is not null
|
static <T,R> LObjLongFunction<T,R> |
objLongFunc(LObjLongFunction<T,R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V1,V2> LBiFunction<V1,V2,R> |
objLongFuncCompose(LFunction<? super V1,? extends T> before1,
LToLongFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T,R> LObjLongFunction<T,R> |
objLongFuncThrowing(ExF<Throwable> exF) |
static <T,R> LObjLongFunction<T,R> |
objLongFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T,R> R |
produce(long a2,
T a1)
Does nothing (LObjLongFunction.LLongObjFunc) Function
|
static <T,R> R |
produce(T a1,
long a2)
Does nothing (LObjLongFunction) Function
|
static <T,R> LObjLongFunction<T,R> |
recursive(LFunction<LObjLongFunction<T,R>,LObjLongFunction<T,R>> selfLambda) |
default LFunction<T,R> |
rShrink(LToLongFunction<T> right) |
default LFunction<T,R> |
rShrinkc(long a2) |
static <T,R> LFunction<T,R> |
rShrinked(LToLongFunction<T> right,
LObjLongFunction<T,R> func) |
static <T,R> LFunction<T,R> |
rShrinkedc(long a2,
LObjLongFunction<T,R> func) |
static <T,R> LObjLongFunction<T,R> |
safe()
Safe instance.
|
static <T,R> LObjLongFunction<T,R> |
safe(LObjLongFunction<T,R> other)
Safe wrapping.
|
static <T,R> LSupplier<LObjLongFunction<T,R>> |
safeSupplier()
Safe instance supplier.
|
static <T,R> LSupplier<LObjLongFunction<T,R>> |
safeSupplier(LSupplier<LObjLongFunction<T,R>> supplier)
Safe supplier.
|
default R |
shovingApply(T a1,
long a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LObjLongFunction<T,V> |
then(LFunction<? super R,? extends V> after)
Combines two functions together in a order.
|
default LObjLongConsumer<T> |
thenConsume(LConsumer<? super R> after)
Combines two functions together in a order.
|
default LObjLongPredicate<T> |
thenToBool(LPredicate<? super R> after)
Combines two functions together in a order.
|
static <T,R> void |
times(long max_a2,
T a1,
LObjLongFunction<T,R> func)
From-To.
|
static <T,R> R |
tryApply(T a1,
long a2,
LObjLongFunction<T,R> func) |
static <T,R> R |
tryApply(T a1,
long a2,
LObjLongFunction<T,R> func,
ExWF<RuntimeException> exF) |
static <T,R> R |
tryApply(T a1,
long a2,
LObjLongFunction<T,R> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T,R> R |
tryApplyThen(T a1,
long a2,
LObjLongFunction<T,R> func,
LFunction<Throwable,R> handler) |
default LObjLongFunction<T,R> |
trying(ExWF<RuntimeException> exF) |
default LObjLongFunction<T,R> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LObjLongFunction<T,R> |
tryingThen(LFunction<Throwable,R> handler) |
default R |
tupleApply(LObjLongPair<T> args) |
static <T,R> LObjLongFunction<T,R> |
uncurry(LFunction<T,LLongFunction<R>> func) |
default LObjLongFunction |
untyped()
Cast that removes generics.
|
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
R applyX(T a1, long a2) throws Throwable
Implement this, but call apply(T a1,long a2)
Throwabledefault R tupleApply(LObjLongPair<T> args)
default R handlingApply(T a1, long a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LObjLongFunction<T,R> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default R apply(T a1, long a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LObjLongFunction<T,R> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default R apply(T a1, long a2, @Nonnull ExWF<RuntimeException> exF)
default LObjLongFunction<T,R> trying(@Nonnull ExWF<RuntimeException> exF)
default R nestingApply(T a1, long a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default R shovingApply(T a1, long a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T,R> R handlingApply(T a1,
long a2,
LObjLongFunction<T,R> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T,R> R tryApply(T a1,
long a2,
LObjLongFunction<T,R> func)
static <T,R> R tryApply(T a1,
long a2,
LObjLongFunction<T,R> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T,R> R tryApply(T a1,
long a2,
LObjLongFunction<T,R> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T,R> R tryApplyThen(T a1,
long a2,
LObjLongFunction<T,R> func,
@Nonnull
LFunction<Throwable,R> handler)
static <T,R> R failSafeApply(T a1,
long a2,
LObjLongFunction<T,R> func,
@Nonnull
LObjLongFunction<T,R> failSafe)
static <T,R> LObjLongFunction<T,R> failSafe(LObjLongFunction<T,R> func, @Nonnull LObjLongFunction<T,R> failSafe)
@Nonnull default R nonNullApply(T a1, long a2)
Function call that ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T,R> void fromTo(long min_a2,
long max_a2,
T a1,
LObjLongFunction<T,R> func)
From-To. Intended to be used with non-capturing lambda.
static <T,R> void fromTill(long min_a2,
long max_a2,
T a1,
LObjLongFunction<T,R> func)
From-To. Intended to be used with non-capturing lambda.
static <T,R> void times(long max_a2,
T a1,
LObjLongFunction<T,R> func)
From-To. Intended to be used with non-capturing lambda.
default LLongFunction<R> lShrink(LLongFunction<T> left)
default LLongFunction<R> lShrinkc(T a1)
static <R,T> LLongFunction<R> lShrinked(LLongFunction<T> left, LObjLongFunction<T,R> func)
static <R,T> LLongFunction<R> lShrinkedc(T a1, LObjLongFunction<T,R> func)
default LFunction<T,R> rShrink(LToLongFunction<T> right)
static <T,R> LFunction<T,R> rShrinked(LToLongFunction<T> right, LObjLongFunction<T,R> func)
static <T,R> LFunction<T,R> rShrinkedc(long a2, LObjLongFunction<T,R> func)
static <T,R> LObjLongFunction<T,R> uncurry(LFunction<T,LLongFunction<R>> func)
default LObjLongFunction untyped()
Cast that removes generics.
default <V2,V3> LObjLongFunction<V2,V3> cast()
Cast that replace generics.
static <V2,V3,T,R> LObjLongFunction<V2,V3> cast(LObjLongFunction<T,R> function)
Cast that replace generics.
static <T,R> LObjLongFunction<T,R> constant(R r)
Creates function that always returns the same value.
@Nonnull static <T,R> LObjLongFunction<T,R> apply1st(@Nonnull LFunction<T,R> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T,R> LObjLongFunction<T,R> apply2nd(@Nonnull LLongFunction<R> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T,R> LObjLongFunction<T,R> objLongFunc(@Nonnull LObjLongFunction<T,R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <T,R> LObjLongFunction<T,R> recursive(@Nonnull LFunction<LObjLongFunction<T,R>,LObjLongFunction<T,R>> selfLambda)
@Nonnull static <T,R> LObjLongFunction<T,R> objLongFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T,R> LObjLongFunction<T,R> objLongFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T,R> LObjLongFunction.LLongObjFunc<T,R> longObjFunc(@Nonnull LObjLongFunction.LLongObjFunc<T,R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T,R> R call(T a1,
long a2,
@Nonnull
LObjLongFunction<T,R> lambda)
@Nonnull static <T,R> LObjLongFunction<T,R> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <T,R> LSupplier<LObjLongFunction<T,R>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T,R> LObjLongFunction<T,R> safe(@Nullable LObjLongFunction<T,R> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T,R> LSupplier<LObjLongFunction<T,R>> safeSupplier(@Nullable LSupplier<LObjLongFunction<T,R>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LObjLongFunction<V1,R> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LLongUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T,R> LObjLongFunction<V1,R> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LLongUnaryOperator before2, LObjLongFunction<T,R> after)
@Nonnull default <V1,V2> LBiFunction<V1,V2,R> objLongFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToLongFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T,R> LBiFunction<V1,V2,R> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToLongFunction<? super V2> before2, LObjLongFunction<T,R> after)
@Nonnull default <V> LObjLongFunction<T,V> then(@Nonnull LFunction<? super R,? extends V> after)
Combines two functions together in a order.
@Nonnull default LObjLongConsumer<T> thenConsume(@Nonnull LConsumer<? super R> after)
Combines two functions together in a order.
@Nonnull default LObjLongFunction<T,R> before(@Nonnull LObjLongConsumer<? super T> before)
@Nonnull default LObjLongPredicate<T> thenToBool(@Nonnull LPredicate<? super R> after)
Combines two functions together in a order.
@Nonnull default LObjLongFunction<T,R> nonNullable()
Converts to function that makes sure that the result is not null.
static <T,R> R produce(T a1,
long a2)
Does nothing (LObjLongFunction) Function
static <T,R> R produce(long a2,
T a1)
Does nothing (LObjLongFunction.LLongObjFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aLong> ia2, C2 source2, 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 <C1,I1,C2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.aLong> ia2, C2 source2, 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 <C1,C2,I2> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.aLong> sa2, C2 source2, 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 <C1,I1,C2,I2> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.aLong> sa2, C2 source2, 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.