@FunctionalInterface public interface LTernaryOperator<T> extends MetaOperator, MetaInterface.NonThrowing, Codomain<aType.a<T>>, Domain3<aType.a<T>,aType.a<T>,aType.a<T>>, LTriFunction<T,T,T,T>
Non-throwing functional interface (lambda) LTernaryOperator for Java 8.
Type: operator
Domain (lvl: 3): T a1,T a2,T a3
Co-domain: T
| Modifier and Type | Interface and Description |
|---|---|
static class |
LTernaryOperator.LTernaryOperatorSingle<T> |
LTriFunction.LBiObj1Obj0Func<T3,T2,T1,R>, LTriFunction.LObj0Obj2Obj1Func<T1,T3,T2,R>, LTriFunction.LObj1BiObj2Func<T2,T1,T3,R>, LTriFunction.LObj1Obj2Obj0Func<T2,T3,T1,R>, LTriFunction.LObj2Obj0Obj1Func<T3,T1,T2,R>, LTriFunction.LTriFunctionSingle<T1,T2,T3,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 T |
apply(T a1,
T a2,
T a3,
ExWF<RuntimeException> exF) |
default T |
apply(T a1,
T a2,
T a3,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> LTernaryOperator<T> |
apply1st(LUnaryOperator<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LTernaryOperator<T> |
apply2nd(LUnaryOperator<T> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
static <T> LTernaryOperator<T> |
apply3rd(LUnaryOperator<T> func)
Captures single parameter function into this interface where only 3rd parameter will be used.
|
default T |
applyThen(T a1,
T a2,
T a3,
LFunction<Throwable,T> handler) |
static <T> T |
call(T a1,
T a2,
T a3,
LTernaryOperator<T> lambda) |
default LSupplier<T> |
capture(T a1,
T a2,
T a3)
Captures arguments but delays the evaluation.
|
default LTernaryOperator |
cast()
Cast that replace generics.
|
static <T> LTernaryOperator |
cast(LTernaryOperator<T> function)
Cast that replace generics.
|
static <T> LTernaryOperator<T> |
constant(T r)
Creates function that always returns the same value.
|
static <T> LTernaryOperator<T> |
failSafe(LTernaryOperator<T> func,
LTernaryOperator<T> failSafe) |
default T |
failSafeApply(T a1,
T a2,
T a3,
LTernaryOperator<T> failSafe) |
static <T> T |
failSafeApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
LTernaryOperator<T> failSafe) |
default <C1,C2,C3> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.a<T>> ia2,
C2 source2,
IndexedRead<C3,aType.a<T>> ia3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <T> void |
fromTill(int min_i,
int max_i,
T a1,
T a2,
T a3,
LTernaryOperator<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
T a1,
T a2,
T a3,
LTernaryOperator<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LTernaryOperator<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default T |
handlingApply(T a1,
T a2,
T a3,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> T |
handlingApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C1,C2,C3,I3> |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.a<T>> ia2,
C2 source2,
SequentialRead<C3,I3,aType.a<T>> sa3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,C2,I2,C3> |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.a<T>> sa2,
C2 source2,
IndexedRead<C3,aType.a<T>> ia3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,C2,I2,C3,I3> |
iterate(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
SequentialRead<C2,I2,aType.a<T>> sa2,
C2 source2,
SequentialRead<C3,I3,aType.a<T>> sa3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2,C3> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
IndexedRead<C2,aType.a<T>> ia2,
C2 source2,
IndexedRead<C3,aType.a<T>> ia3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2,C3,I3> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
IndexedRead<C2,aType.a<T>> ia2,
C2 source2,
SequentialRead<C3,I3,aType.a<T>> sa3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2,I2,C3> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.a<T>> sa2,
C2 source2,
IndexedRead<C3,aType.a<T>> ia3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default <C1,I1,C2,I2,C3,I3> |
iterate(SequentialRead<C1,I1,aType.a<T>> sa1,
C1 source1,
SequentialRead<C2,I2,aType.a<T>> sa2,
C2 source2,
SequentialRead<C3,I3,aType.a<T>> sa3,
C3 source3,
LConsumer<? super T> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LBinaryOperator<T> |
lShrink(LBinaryOperator<T> left) |
default LBinaryOperator<T> |
lShrinkc(T a1) |
static <T> LBinaryOperator<T> |
lShrinked(LBinaryOperator<T> left,
LTernaryOperator<T> func) |
static <T> LBinaryOperator<T> |
lShrinkedc(T a1,
LTernaryOperator<T> func) |
default T |
nestingApply(T a1,
T a2,
T a3)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LTernaryOperator<T> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default T |
nonNullApply(T a1,
T a2,
T a3)
Function call that ensures the result is not null
|
static <T> T |
produce(T a1,
T a2,
T a3)
Does nothing (LTernaryOperator) Operator
|
static <T> LTernaryOperator<T> |
recursive(LFunction<LTernaryOperator<T>,LTernaryOperator<T>> selfLambda) |
default LBinaryOperator<T> |
rShrink(LBinaryOperator<T> right) |
default LBinaryOperator<T> |
rShrinkc(T a3) |
static <T> LBinaryOperator<T> |
rShrinked(LBinaryOperator<T> right,
LTernaryOperator<T> func) |
static <T> LBinaryOperator<T> |
rShrinkedc(T a3,
LTernaryOperator<T> func) |
static <T> LTernaryOperator<T> |
safe()
Safe instance.
|
static <T> LTernaryOperator<T> |
safe(LTernaryOperator<T> other)
Safe wrapping.
|
static <T> LSupplier<LTernaryOperator<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LTernaryOperator<T>> |
safeSupplier(LSupplier<LTernaryOperator<T>> supplier)
Safe supplier.
|
default T |
shovingApply(T a1,
T a2,
T a3)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
static <T> LTernaryOperator<T> |
ternaryOp(LTernaryOperator<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T> LTernaryOperator<T> |
ternaryOpThrowing(ExF<Throwable> exF) |
static <T> LTernaryOperator<T> |
ternaryOpThrowing(String message,
ExMF<Throwable> exF) |
default <V> LTriFunction<T,T,T,V> |
then(LFunction<? super T,? extends V> after)
Combines two functions together in a order.
|
default LTriPredicate<T,T,T> |
thenToBool(LPredicate<? super T> after)
Combines two functions together in a order.
|
default LToIntTriFunction<T,T,T> |
thenToInt(LToIntFunction<? super T> after)
Combines two functions together in a order.
|
static <T> void |
times(int max_i,
T a1,
T a2,
T a3,
LTernaryOperator<T> func)
From-To.
|
static <T> T |
tryApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func) |
static <T> T |
tryApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
ExWF<RuntimeException> exF) |
static <T> T |
tryApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> T |
tryApplyThen(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
LFunction<Throwable,T> handler) |
default LTernaryOperator<T> |
trying(ExWF<RuntimeException> exF) |
default LTernaryOperator<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LTernaryOperator<T> |
tryingThen(LFunction<Throwable,T> handler) |
default T |
tupleApply(LTriple<T,T,T> args) |
static <T> LTernaryOperator<T> |
uncurry(LFunction<T,LFunction<T,LUnaryOperator<T>>> func) |
default LTernaryOperator |
untyped()
Cast that removes generics.
|
isOperatorafter, apply, apply1st, apply2nd, apply3rd, applyX, before, biObj1Obj0Func, call, cast, compose, composed, failSafe, failSafeApply, failSafeApply, fromTill, fromTo, handlingApply, lShrink, lShrinked, lShrinkedc, obj0Obj2Obj1Func, obj1BiObj2Func, obj1Obj2Obj0Func, obj2Obj0Obj1Func, recursive, rShrink, rShrinked, rShrinkedc, safe, safeSupplier, thenConsume, times, triFunc, triFuncThrowing, triFuncThrowing, tryApply, tryApply, tryApply, tryApplyThen, uncurryisFunctionformatTo, isAction, isConsumer, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
default T tupleApply(LTriple<T,T,T> args)
tupleApply in interface LTriFunction<T,T,T,T>default T handlingApply(T a1, T a2, T a3, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
handlingApply in interface LTriFunction<T,T,T,T>default LTernaryOperator<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default T apply(T a1, T a2, T a3, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LTernaryOperator<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LTernaryOperator<T> trying(@Nonnull ExWF<RuntimeException> exF)
default LTernaryOperator<T> tryingThen(@Nonnull LFunction<Throwable,T> handler)
tryingThen in interface LTriFunction<T,T,T,T>default T nestingApply(T a1, T a2, T a3)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
nestingApply in interface LTriFunction<T,T,T,T>default T shovingApply(T a1, T a2, T a3)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
shovingApply in interface LTriFunction<T,T,T,T>static <T> T handlingApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> T tryApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func)
static <T> T tryApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> T tryApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> T tryApplyThen(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
@Nonnull
LFunction<Throwable,T> handler)
static <T> T failSafeApply(T a1,
T a2,
T a3,
LTernaryOperator<T> func,
@Nonnull
LTernaryOperator<T> failSafe)
static <T> LTernaryOperator<T> failSafe(LTernaryOperator<T> func, @Nonnull LTernaryOperator<T> failSafe)
@Nonnull default T nonNullApply(T a1, T a2, T a3)
Function call that ensures the result is not null
nonNullApply in interface LTriFunction<T,T,T,T>@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface LTriFunction<T,T,T,T>functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <T> void fromTo(int min_i,
int max_i,
T a1,
T a2,
T a3,
LTernaryOperator<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
T a1,
T a2,
T a3,
LTernaryOperator<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
T a1,
T a2,
T a3,
LTernaryOperator<T> func)
From-To. Intended to be used with non-capturing lambda.
default LBinaryOperator<T> lShrink(LBinaryOperator<T> left)
default LBinaryOperator<T> lShrinkc(T a1)
static <T> LBinaryOperator<T> lShrinked(LBinaryOperator<T> left, LTernaryOperator<T> func)
static <T> LBinaryOperator<T> lShrinkedc(T a1, LTernaryOperator<T> func)
default LBinaryOperator<T> rShrink(LBinaryOperator<T> right)
default LBinaryOperator<T> rShrinkc(T a3)
static <T> LBinaryOperator<T> rShrinked(LBinaryOperator<T> right, LTernaryOperator<T> func)
static <T> LBinaryOperator<T> rShrinkedc(T a3, LTernaryOperator<T> func)
static <T> LTernaryOperator<T> uncurry(LFunction<T,LFunction<T,LUnaryOperator<T>>> func)
default LTernaryOperator untyped()
Cast that removes generics.
default LTernaryOperator cast()
Cast that replace generics.
static <T> LTernaryOperator cast(LTernaryOperator<T> function)
Cast that replace generics.
default LSupplier<T> capture(T a1, T a2, T a3)
Captures arguments but delays the evaluation.
static <T> LTernaryOperator<T> constant(T r)
Creates function that always returns the same value.
@Nonnull static <T> LTernaryOperator<T> apply1st(@Nonnull LUnaryOperator<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LTernaryOperator<T> apply2nd(@Nonnull LUnaryOperator<T> func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LTernaryOperator<T> apply3rd(@Nonnull LUnaryOperator<T> func)
Captures single parameter function into this interface where only 3rd parameter will be used.
@Nonnull static <T> LTernaryOperator<T> ternaryOp(@Nonnull LTernaryOperator<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> LTernaryOperator<T> recursive(@Nonnull LFunction<LTernaryOperator<T>,LTernaryOperator<T>> selfLambda)
@Nonnull static <T> LTernaryOperator<T> ternaryOpThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LTernaryOperator<T> ternaryOpThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <T> T call(T a1,
T a2,
T a3,
@Nonnull
LTernaryOperator<T> lambda)
@Nonnull static <T> LTernaryOperator<T> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <T> LSupplier<LTernaryOperator<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
safeSupplier in interface LTriFunction<T,T,T,T>@Nonnull static <T> LTernaryOperator<T> safe(@Nullable LTernaryOperator<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LTernaryOperator<T>> safeSupplier(@Nullable LSupplier<LTernaryOperator<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V> LTriFunction<T,T,T,V> then(@Nonnull LFunction<? super T,? extends V> after)
Combines two functions together in a order.
@Nonnull default LToIntTriFunction<T,T,T> thenToInt(@Nonnull LToIntFunction<? super T> after)
Combines two functions together in a order.
@Nonnull default LTriPredicate<T,T,T> thenToBool(@Nonnull LPredicate<? super T> after)
Combines two functions together in a order.
thenToBool in interface LTriFunction<T,T,T,T>@Nonnull default LTernaryOperator<T> nonNullable()
Converts to function that makes sure that the result is not null.
nonNullable in interface LTriFunction<T,T,T,T>static <T> T produce(T a1,
T a2,
T a3)
Does nothing (LTernaryOperator) Operator
default <C1,C2,C3> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.a<T>> ia2, C2 source2, IndexedRead<C3,aType.a<T>> ia3, C3 source3, LConsumer<? super T> 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,C3> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.a<T>> ia2, C2 source2, IndexedRead<C3,aType.a<T>> ia3, C3 source3, LConsumer<? super T> 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,C3> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.a<T>> sa2, C2 source2, IndexedRead<C3,aType.a<T>> ia3, C3 source3, LConsumer<? super T> 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,C3> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.a<T>> sa2, C2 source2, IndexedRead<C3,aType.a<T>> ia3, C3 source3, LConsumer<? super T> 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,C3,I3> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.a<T>> ia2, C2 source2, SequentialRead<C3,I3,aType.a<T>> sa3, C3 source3, LConsumer<? super T> 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,C3,I3> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, IndexedRead<C2,aType.a<T>> ia2, C2 source2, SequentialRead<C3,I3,aType.a<T>> sa3, C3 source3, LConsumer<? super T> 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,C3,I3> void iterate(IndexedRead<C1,aType.a<T>> ia1, C1 source1, SequentialRead<C2,I2,aType.a<T>> sa2, C2 source2, SequentialRead<C3,I3,aType.a<T>> sa3, C3 source3, LConsumer<? super T> 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,C3,I3> void iterate(SequentialRead<C1,I1,aType.a<T>> sa1, C1 source1, SequentialRead<C2,I2,aType.a<T>> sa2, C2 source2, SequentialRead<C3,I3,aType.a<T>> sa3, C3 source3, LConsumer<? super T> 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.