@FunctionalInterface public interface LOiToCharFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OiFunction<T,aType.aChar>, Codomain<aType.aChar>, Domain2<aType.a<T>,aType.aInt>
Non-throwing functional interface (lambda) LOiToCharFunction for Java 8.
Type: function
Domain (lvl: 2): T a1,int a2
Co-domain: char
Special case of function that corresponds to expressions like (list, index) -> List::get
| Modifier and Type | Interface and Description |
|---|---|
static interface |
LOiToCharFunction.LIntObjToCharFunc<T>
Permutation of LOiToCharFunction for method references.
|
static class |
LOiToCharFunction.LOiToCharFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static <T> LOiToCharFunction<T> |
apply1stAsChar(LToCharFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
|
static <T> LOiToCharFunction<T> |
apply2ndAsChar(LIntToCharFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
|
default char |
applyAsChar(T a1,
int a2) |
default char |
applyAsChar(T a1,
int a2,
ExWF<RuntimeException> exF) |
default char |
applyAsChar(T a1,
int a2,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default char |
applyAsCharThen(T a1,
int a2,
LToCharFunction<Throwable> handler) |
char |
applyAsCharX(T a1,
int a2)
Implement this, but call applyAsChar(T a1,int a2)
|
static <T> char |
call(T a1,
int a2,
LOiToCharFunction<T> lambda) |
default LCharSupplier |
capture(T a1,
int a2)
Captures arguments but delays the evaluation.
|
default <V2> LOiToCharFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LOiToCharFunction<V2> |
cast(LOiToCharFunction<T> function)
Cast that replace generics.
|
default <V1> LOiToCharFunction<V1> |
compose(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
|
static <V1,T> LOiToCharFunction<V1> |
composed(LFunction<? super V1,? extends T> before1,
LIntUnaryOperator before2,
LOiToCharFunction<T> after) |
static <V1,V2,T> LToCharBiFunction<V1,V2> |
composed(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2,
LOiToCharFunction<T> after) |
static <T> LOiToCharFunction<T> |
constant(char r)
Creates function that always returns the same value.
|
static <T> LOiToCharFunction<T> |
failSafe(LOiToCharFunction<T> func,
LOiToCharFunction<T> failSafe) |
default char |
failSafeApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> failSafe) |
static <T> char |
failSafeApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
LOiToCharFunction<T> failSafe) |
default <C1,C2> void |
forEach(IndexedRead<C1,aType.a<T>> ia1,
C1 source1,
IndexedRead<C2,aType.aInt> ia2,
C2 source2,
LCharConsumer 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,
LOiToCharFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_a2,
int max_a2,
T a1,
LOiToCharFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LOiToCharFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default char |
handlingApplyAsChar(T a1,
int a2,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> char |
handlingApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static <T> LOiToCharFunction.LIntObjToCharFunc<T> |
intObjToCharFunc(LOiToCharFunction.LIntObjToCharFunc<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,
LCharConsumer 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,
LCharConsumer 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,
LCharConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default LIntToCharFunction |
lShrink(LIntFunction<T> left) |
default LIntToCharFunction |
lShrinkc(T a1) |
static <T> LIntToCharFunction |
lShrinked(LIntFunction<T> left,
LOiToCharFunction<T> func) |
static <T> LIntToCharFunction |
lShrinkedc(T a1,
LOiToCharFunction<T> func) |
default char |
nestingApplyAsChar(T a1,
int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default char |
nonNullApplyAsChar(T a1,
int a2)
Just to mirror the method: Ensures the result is not null
|
static <T> LOiToCharFunction<T> |
oiToCharFunc(LOiToCharFunction<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> LToCharBiFunction<V1,V2> |
oiToCharFuncCompose(LFunction<? super V1,? extends T> before1,
LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
|
static <T> LOiToCharFunction<T> |
oiToCharFuncThrowing(ExF<Throwable> exF) |
static <T> LOiToCharFunction<T> |
oiToCharFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> char |
produceChar(int a2,
T a1)
Does nothing (LOiToCharFunction.LIntObjToCharFunc) Function
|
static <T> char |
produceChar(T a1,
int a2)
Does nothing (LOiToCharFunction) Function
|
static <T> LOiToCharFunction<T> |
recursive(LFunction<LOiToCharFunction<T>,LOiToCharFunction<T>> selfLambda) |
default LToCharFunction<T> |
rShrink(LToIntFunction<T> right) |
default LToCharFunction<T> |
rShrinkc(int a2) |
static <T> LToCharFunction<T> |
rShrinked(LToIntFunction<T> right,
LOiToCharFunction<T> func) |
static <T> LToCharFunction<T> |
rShrinkedc(int a2,
LOiToCharFunction<T> func) |
static <T> LOiToCharFunction<T> |
safe()
Safe instance.
|
static <T> LOiToCharFunction<T> |
safe(LOiToCharFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LOiToCharFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LOiToCharFunction<T>> |
safeSupplier(LSupplier<LOiToCharFunction<T>> supplier)
Safe supplier.
|
default char |
shovingApplyAsChar(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(LCharFunction<? extends V> after)
Combines two functions together in a order.
|
default LObjIntPredicate<T> |
thenToBool(LCharPredicate after)
Combines two functions together in a order.
|
default LOiToByteFunction<T> |
thenToByte(LCharToByteFunction after)
Combines two functions together in a order.
|
default LOiToCharFunction<T> |
thenToChar(LCharUnaryOperator after)
Combines two functions together in a order.
|
default LOiToDblFunction<T> |
thenToDbl(LCharToDblFunction after)
Combines two functions together in a order.
|
default LOiToFltFunction<T> |
thenToFlt(LCharToFltFunction after)
Combines two functions together in a order.
|
default LOiToIntFunction<T> |
thenToInt(LCharToIntFunction after)
Combines two functions together in a order.
|
default LOiToLongFunction<T> |
thenToLong(LCharToLongFunction after)
Combines two functions together in a order.
|
default LOiToSrtFunction<T> |
thenToSrt(LCharToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_a2,
T a1,
LOiToCharFunction<T> func)
From-To.
|
static <T> char |
tryApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func) |
static <T> char |
tryApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> char |
tryApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> char |
tryApplyAsCharThen(T a1,
int a2,
LOiToCharFunction<T> func,
LToCharFunction<Throwable> handler) |
default LOiToCharFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LOiToCharFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LOiToCharFunction<T> |
tryingThen(LToCharFunction<Throwable> handler) |
default char |
tupleApplyAsChar(LObjIntPair<T> args) |
static <T> LOiToCharFunction<T> |
uncurry(LFunction<T,LIntToCharFunction> func) |
default LOiToCharFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default char applyAsChar(T a1, int a2)
char applyAsCharX(T a1, int a2) throws Throwable
Implement this, but call applyAsChar(T a1,int a2)
Throwabledefault char tupleApplyAsChar(LObjIntPair<T> args)
default char handlingApplyAsChar(T a1, int a2, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LOiToCharFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default char applyAsChar(T a1, int a2, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LOiToCharFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default char applyAsChar(T a1, int a2, @Nonnull ExWF<RuntimeException> exF)
default LOiToCharFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default char applyAsCharThen(T a1, int a2, @Nonnull LToCharFunction<Throwable> handler)
default LOiToCharFunction<T> tryingThen(@Nonnull LToCharFunction<Throwable> handler)
default char nestingApplyAsChar(T a1, int a2)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default char shovingApplyAsChar(T a1, int a2)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> char handlingApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> char tryApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func)
static <T> char tryApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> char tryApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> char tryApplyAsCharThen(T a1,
int a2,
LOiToCharFunction<T> func,
@Nonnull
LToCharFunction<Throwable> handler)
default char failSafeApplyAsChar(T a1, int a2, @Nonnull LOiToCharFunction<T> failSafe)
static <T> char failSafeApplyAsChar(T a1,
int a2,
LOiToCharFunction<T> func,
@Nonnull
LOiToCharFunction<T> failSafe)
static <T> LOiToCharFunction<T> failSafe(LOiToCharFunction<T> func, @Nonnull LOiToCharFunction<T> failSafe)
default char nonNullApplyAsChar(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,
LOiToCharFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_a2,
int max_a2,
T a1,
LOiToCharFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_a2,
T a1,
LOiToCharFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LIntToCharFunction lShrink(LIntFunction<T> left)
default LIntToCharFunction lShrinkc(T a1)
static <T> LIntToCharFunction lShrinked(LIntFunction<T> left, LOiToCharFunction<T> func)
static <T> LIntToCharFunction lShrinkedc(T a1, LOiToCharFunction<T> func)
default LToCharFunction<T> rShrink(LToIntFunction<T> right)
default LToCharFunction<T> rShrinkc(int a2)
static <T> LToCharFunction<T> rShrinked(LToIntFunction<T> right, LOiToCharFunction<T> func)
static <T> LToCharFunction<T> rShrinkedc(int a2, LOiToCharFunction<T> func)
static <T> LOiToCharFunction<T> uncurry(LFunction<T,LIntToCharFunction> func)
default LOiToCharFunction untyped()
Cast that removes generics.
default <V2> LOiToCharFunction<V2> cast()
Cast that replace generics.
static <V2,T> LOiToCharFunction<V2> cast(LOiToCharFunction<T> function)
Cast that replace generics.
default LCharSupplier capture(T a1, int a2)
Captures arguments but delays the evaluation.
static <T> LOiToCharFunction<T> constant(char r)
Creates function that always returns the same value.
@Nonnull static <T> LOiToCharFunction<T> apply1stAsChar(@Nonnull LToCharFunction<T> func)
Captures single parameter function into this interface where only 1st parameter will be used.
@Nonnull static <T> LOiToCharFunction<T> apply2ndAsChar(@Nonnull LIntToCharFunction func)
Captures single parameter function into this interface where only 2nd parameter will be used.
@Nonnull static <T> LOiToCharFunction<T> oiToCharFunc(@Nonnull LOiToCharFunction<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> LOiToCharFunction<T> recursive(@Nonnull LFunction<LOiToCharFunction<T>,LOiToCharFunction<T>> selfLambda)
@Nonnull static <T> LOiToCharFunction<T> oiToCharFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LOiToCharFunction<T> oiToCharFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
@Nonnull static <T> LOiToCharFunction.LIntObjToCharFunc<T> intObjToCharFunc(@Nonnull LOiToCharFunction.LIntObjToCharFunc<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
static <T> char call(T a1,
int a2,
@Nonnull
LOiToCharFunction<T> lambda)
@Nonnull static <T> LOiToCharFunction<T> safe()
Safe instance. That always returns the same value (as produceChar).
@Nonnull static <T> LSupplier<LOiToCharFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LOiToCharFunction<T> safe(@Nullable LOiToCharFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LOiToCharFunction<T>> safeSupplier(@Nullable LSupplier<LOiToCharFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V1> LOiToCharFunction<V1> compose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2)
Allows to manipulate the domain of the function.
static <V1,T> LOiToCharFunction<V1> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LIntUnaryOperator before2, LOiToCharFunction<T> after)
@Nonnull default <V1,V2> LToCharBiFunction<V1,V2> oiToCharFuncCompose(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2)
Allows to manipulate the domain of the function.
static <V1,V2,T> LToCharBiFunction<V1,V2> composed(@Nonnull LFunction<? super V1,? extends T> before1, @Nonnull LToIntFunction<? super V2> before2, LOiToCharFunction<T> after)
@Nonnull default <V> LOiFunction<T,V> then(@Nonnull LCharFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LOiToByteFunction<T> thenToByte(@Nonnull LCharToByteFunction after)
Combines two functions together in a order.
@Nonnull default LOiToSrtFunction<T> thenToSrt(@Nonnull LCharToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LOiToIntFunction<T> thenToInt(@Nonnull LCharToIntFunction after)
Combines two functions together in a order.
@Nonnull default LOiToLongFunction<T> thenToLong(@Nonnull LCharToLongFunction after)
Combines two functions together in a order.
@Nonnull default LOiToFltFunction<T> thenToFlt(@Nonnull LCharToFltFunction after)
Combines two functions together in a order.
@Nonnull default LOiToDblFunction<T> thenToDbl(@Nonnull LCharToDblFunction after)
Combines two functions together in a order.
@Nonnull default LOiToCharFunction<T> thenToChar(@Nonnull LCharUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LObjIntPredicate<T> thenToBool(@Nonnull LCharPredicate after)
Combines two functions together in a order.
static <T> char produceChar(T a1,
int a2)
Does nothing (LOiToCharFunction) Function
static <T> char produceChar(int a2,
T a1)
Does nothing (LOiToCharFunction.LIntObjToCharFunc) Function
default <C1,C2> void forEach(IndexedRead<C1,aType.a<T>> ia1, C1 source1, IndexedRead<C2,aType.aInt> ia2, C2 source2, LCharConsumer 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, LCharConsumer 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, LCharConsumer 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, LCharConsumer 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.