@FunctionalInterface public interface LToCharFunction<T> extends MetaFunction, MetaInterface.NonThrowing, OFunction<T,aType.aChar>, Codomain<aType.aChar>, Domain1<aType.a<T>>
Non-throwing functional interface (lambda) LToCharFunction for Java 8.
Type: function
Domain (lvl: 1): T a
Co-domain: char
Special case of function that corresponds to expressions like (iterator) -> Iterator::next
| Modifier and Type | Interface and Description |
|---|---|
static class |
LToCharFunction.LToCharFunctionSingle<T> |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
default char |
applyAsChar(T a) |
default char |
applyAsChar(T a,
ExWF<RuntimeException> exF) |
default char |
applyAsChar(T a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default char |
applyAsCharThen(T a,
LToCharFunction<Throwable> handler) |
char |
applyAsCharX(T a)
Implement this, but call applyAsChar(T a)
|
static <T> char |
call(T a,
LToCharFunction<T> lambda) |
default LCharSupplier |
capture(T a)
Captures arguments but delays the evaluation.
|
default <V2> LToCharFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,T> LToCharFunction<V2> |
cast(LToCharFunction<T> function)
Cast that replace generics.
|
default <V> LToCharFunction<V> |
compose(LFunction<? super V,? extends T> before)
Allows to manipulate the domain of the function.
|
static <V,T> LToCharFunction<V> |
composed(LFunction<? super V,? extends T> before,
LToCharFunction<T> after) |
static <T> LToCharFunction<T> |
constant(char r)
Creates function that always returns the same value.
|
static <T> LToCharFunction<T> |
failSafe(LToCharFunction<T> func,
LToCharFunction<T> failSafe) |
default char |
failSafeApplyAsChar(T a,
LToCharFunction<T> failSafe) |
static <T> char |
failSafeApplyAsChar(T a,
LToCharFunction<T> func,
LToCharFunction<T> failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.a<T>> ia,
C0 source,
LCharConsumer 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 a,
LToCharFunction<T> func)
From-To.
|
static <T> void |
fromTo(int min_i,
int max_i,
T a,
LToCharFunction<T> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LToCharFunction<T> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default char |
handlingApplyAsChar(T a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <T> char |
handlingApplyAsChar(T a,
LToCharFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.a<T>> sa,
C0 source,
LCharConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default char |
nestingApplyAsChar(T a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default char |
nonNullApplyAsChar(T a)
Just to mirror the method: Ensures the result is not null
|
static <T> char |
produceChar(T a)
Does nothing (LToCharFunction) Function
|
static <T> LToCharFunction<T> |
recursive(LFunction<LToCharFunction<T>,LToCharFunction<T>> selfLambda) |
static <T> LToCharFunction<T> |
safe()
Safe instance.
|
static <T> LToCharFunction<T> |
safe(LToCharFunction<T> other)
Safe wrapping.
|
static <T> LSupplier<LToCharFunction<T>> |
safeSupplier()
Safe instance supplier.
|
static <T> LSupplier<LToCharFunction<T>> |
safeSupplier(LSupplier<LToCharFunction<T>> supplier)
Safe supplier.
|
default char |
shovingApplyAsChar(T a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LFunction<T,V> |
then(LCharFunction<? extends V> after)
Combines two functions together in a order.
|
default LPredicate<T> |
thenToBool(LCharPredicate after)
Combines two functions together in a order.
|
default LToByteFunction<T> |
thenToByte(LCharToByteFunction after)
Combines two functions together in a order.
|
default LToCharFunction<T> |
thenToChar(LCharUnaryOperator after)
Combines two functions together in a order.
|
default LToDblFunction<T> |
thenToDbl(LCharToDblFunction after)
Combines two functions together in a order.
|
default LToFltFunction<T> |
thenToFlt(LCharToFltFunction after)
Combines two functions together in a order.
|
default LToIntFunction<T> |
thenToInt(LCharToIntFunction after)
Combines two functions together in a order.
|
default LToLongFunction<T> |
thenToLong(LCharToLongFunction after)
Combines two functions together in a order.
|
default LToSrtFunction<T> |
thenToSrt(LCharToSrtFunction after)
Combines two functions together in a order.
|
static <T> void |
times(int max_i,
T a,
LToCharFunction<T> func)
From-To.
|
static <T> LToCharFunction<T> |
toCharFunc(LToCharFunction<T> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
static <T> LToCharFunction<T> |
toCharFuncThrowing(ExF<Throwable> exF) |
static <T> LToCharFunction<T> |
toCharFuncThrowing(String message,
ExMF<Throwable> exF) |
static <T> char |
tryApplyAsChar(T a,
LToCharFunction<T> func) |
static <T> char |
tryApplyAsChar(T a,
LToCharFunction<T> func,
ExWF<RuntimeException> exF) |
static <T> char |
tryApplyAsChar(T a,
LToCharFunction<T> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <T> char |
tryApplyAsCharThen(T a,
LToCharFunction<T> func,
LToCharFunction<Throwable> handler) |
default LToCharFunction<T> |
trying(ExWF<RuntimeException> exF) |
default LToCharFunction<T> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LToCharFunction<T> |
tryingThen(LToCharFunction<Throwable> handler) |
default char |
tupleApplyAsChar(LSingle<T> args) |
default LToCharFunction |
untyped()
Cast that removes generics.
|
isThrowingisFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierstatic final String DESCRIPTION
default char applyAsChar(T a)
char applyAsCharX(T a) throws Throwable
Implement this, but call applyAsChar(T a)
Throwabledefault char handlingApplyAsChar(T a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LToCharFunction<T> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default char applyAsChar(T a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LToCharFunction<T> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default char applyAsChar(T a, @Nonnull ExWF<RuntimeException> exF)
default LToCharFunction<T> trying(@Nonnull ExWF<RuntimeException> exF)
default char applyAsCharThen(T a, @Nonnull LToCharFunction<Throwable> handler)
default LToCharFunction<T> tryingThen(@Nonnull LToCharFunction<Throwable> handler)
default char nestingApplyAsChar(T a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default char shovingApplyAsChar(T a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <T> char handlingApplyAsChar(T a,
LToCharFunction<T> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <T> char tryApplyAsChar(T a,
LToCharFunction<T> func)
static <T> char tryApplyAsChar(T a,
LToCharFunction<T> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <T> char tryApplyAsChar(T a,
LToCharFunction<T> func,
@Nonnull
ExWF<RuntimeException> exF)
static <T> char tryApplyAsCharThen(T a,
LToCharFunction<T> func,
@Nonnull
LToCharFunction<Throwable> handler)
default char failSafeApplyAsChar(T a, @Nonnull LToCharFunction<T> failSafe)
static <T> char failSafeApplyAsChar(T a,
LToCharFunction<T> func,
@Nonnull
LToCharFunction<T> failSafe)
static <T> LToCharFunction<T> failSafe(LToCharFunction<T> func, @Nonnull LToCharFunction<T> failSafe)
default char nonNullApplyAsChar(T a)
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_i,
int max_i,
T a,
LToCharFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void fromTill(int min_i,
int max_i,
T a,
LToCharFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
static <T> void times(int max_i,
T a,
LToCharFunction<T> func)
From-To. Intended to be used with non-capturing lambda.
default LToCharFunction untyped()
Cast that removes generics.
default <V2> LToCharFunction<V2> cast()
Cast that replace generics.
static <V2,T> LToCharFunction<V2> cast(LToCharFunction<T> function)
Cast that replace generics.
default LCharSupplier capture(T a)
Captures arguments but delays the evaluation.
static <T> LToCharFunction<T> constant(char r)
Creates function that always returns the same value.
@Nonnull static <T> LToCharFunction<T> toCharFunc(@Nonnull LToCharFunction<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> LToCharFunction<T> recursive(@Nonnull LFunction<LToCharFunction<T>,LToCharFunction<T>> selfLambda)
@Nonnull static <T> LToCharFunction<T> toCharFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <T> LToCharFunction<T> toCharFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <T> char call(T a,
@Nonnull
LToCharFunction<T> lambda)
@Nonnull static <T> LToCharFunction<T> safe()
Safe instance. That always returns the same value (as produceChar).
@Nonnull static <T> LSupplier<LToCharFunction<T>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <T> LToCharFunction<T> safe(@Nullable LToCharFunction<T> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <T> LSupplier<LToCharFunction<T>> safeSupplier(@Nullable LSupplier<LToCharFunction<T>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default <V> LToCharFunction<V> compose(@Nonnull LFunction<? super V,? extends T> before)
Allows to manipulate the domain of the function.
static <V,T> LToCharFunction<V> composed(@Nonnull LFunction<? super V,? extends T> before, LToCharFunction<T> after)
@Nonnull default <V> LFunction<T,V> then(@Nonnull LCharFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LToByteFunction<T> thenToByte(@Nonnull LCharToByteFunction after)
Combines two functions together in a order.
@Nonnull default LToSrtFunction<T> thenToSrt(@Nonnull LCharToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LToIntFunction<T> thenToInt(@Nonnull LCharToIntFunction after)
Combines two functions together in a order.
@Nonnull default LToLongFunction<T> thenToLong(@Nonnull LCharToLongFunction after)
Combines two functions together in a order.
@Nonnull default LToFltFunction<T> thenToFlt(@Nonnull LCharToFltFunction after)
Combines two functions together in a order.
@Nonnull default LToDblFunction<T> thenToDbl(@Nonnull LCharToDblFunction after)
Combines two functions together in a order.
@Nonnull default LToCharFunction<T> thenToChar(@Nonnull LCharUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LPredicate<T> thenToBool(@Nonnull LCharPredicate after)
Combines two functions together in a order.
static <T> char produceChar(T a)
Does nothing (LToCharFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.a<T>> ia, C0 source, 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 <C0,I0> void iterate(SequentialRead<C0,I0,aType.a<T>> sa, C0 source, 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.