@FunctionalInterface public interface LCharFunction<R> extends MetaFunction, MetaInterface.NonThrowing, Codomain<aType.a<R>>, Domain1<aType.aChar>
Non-throwing functional interface (lambda) LCharFunction for Java 8.
Type: function
Domain (lvl: 1): char a
Co-domain: R
| Modifier and Type | Interface and Description |
|---|---|
static class |
LCharFunction.LCharFunctionSingle<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 LCharFunction<R> |
after(LConsumer<? super R> after) |
default R |
apply(char a) |
default R |
apply(char a,
ExWF<RuntimeException> exF) |
default R |
apply(char a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default R |
applyThen(char a,
LFunction<Throwable,R> handler) |
R |
applyX(char a)
Implement this, but call apply(char a)
|
default LCharFunction<R> |
before(LCharConsumer before) |
static <R> R |
call(char a,
LCharFunction<R> lambda) |
default LSupplier<R> |
capture(char a)
Captures arguments but delays the evaluation.
|
default <V2> LCharFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,R> LCharFunction<V2> |
cast(LCharFunction<R> function)
Cast that replace generics.
|
static <R> LCharFunction<R> |
charFunc(LCharFunction<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LFunction<V,R> |
charFuncCompose(LToCharFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static <R> LCharFunction<R> |
charFuncThrowing(ExF<Throwable> exF) |
static <R> LCharFunction<R> |
charFuncThrowing(String message,
ExMF<Throwable> exF) |
default LCharFunction<R> |
compose(LCharUnaryOperator before)
Allows to manipulate the domain of the function.
|
static <R> LCharFunction<R> |
composed(LCharUnaryOperator before,
LCharFunction<R> after) |
static <V,R> LFunction<V,R> |
composed(LToCharFunction<? super V> before,
LCharFunction<R> after) |
static <R> LCharFunction<R> |
constant(R r)
Creates function that always returns the same value.
|
static <R> LCharFunction<R> |
failSafe(LCharFunction<R> func,
LCharFunction<R> failSafe) |
default R |
failSafeApply(char a,
LCharFunction<R> failSafe) |
static <R> R |
failSafeApply(char a,
LCharFunction<R> func,
LCharFunction<R> failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.aChar> ia,
C0 source,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static <R> void |
fromTill(int min_i,
int max_i,
char a,
LCharFunction<R> func)
From-To.
|
static <R> void |
fromTo(int min_i,
int max_i,
char a,
LCharFunction<R> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LCharFunction<R> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default R |
handlingApply(char a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <R> R |
handlingApply(char a,
LCharFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.aChar> sa,
C0 source,
LConsumer<? super R> consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default R |
nestingApply(char a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LCharFunction<R> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default R |
nonNullApply(char a)
Function call that ensures the result is not null
|
static <R> R |
produce(char a)
Does nothing (LCharFunction) Function
|
static <R> LCharFunction<R> |
recursive(LFunction<LCharFunction<R>,LCharFunction<R>> selfLambda) |
static <R> LCharFunction<R> |
safe()
Safe instance.
|
static <R> LCharFunction<R> |
safe(LCharFunction<R> other)
Safe wrapping.
|
static <R> LSupplier<LCharFunction<R>> |
safeSupplier()
Safe instance supplier.
|
static <R> LSupplier<LCharFunction<R>> |
safeSupplier(LSupplier<LCharFunction<R>> supplier)
Safe supplier.
|
default R |
shovingApply(char a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LCharFunction<V> |
then(LFunction<? super R,? extends V> after)
Combines two functions together in a order.
|
default LCharConsumer |
thenConsume(LConsumer<? super R> after)
Combines two functions together in a order.
|
default LCharPredicate |
thenToBool(LPredicate<? super R> after)
Combines two functions together in a order.
|
default LCharToByteFunction |
thenToByte(LToByteFunction<? super R> after)
Combines two functions together in a order.
|
default LCharUnaryOperator |
thenToChar(LToCharFunction<? super R> after)
Combines two functions together in a order.
|
default LCharToDblFunction |
thenToDbl(LToDblFunction<? super R> after)
Combines two functions together in a order.
|
default LCharToFltFunction |
thenToFlt(LToFltFunction<? super R> after)
Combines two functions together in a order.
|
default LCharToIntFunction |
thenToInt(LToIntFunction<? super R> after)
Combines two functions together in a order.
|
default LCharToLongFunction |
thenToLong(LToLongFunction<? super R> after)
Combines two functions together in a order.
|
default LCharToSrtFunction |
thenToSrt(LToSrtFunction<? super R> after)
Combines two functions together in a order.
|
static <R> void |
times(int max_i,
char a,
LCharFunction<R> func)
From-To.
|
static <R> R |
tryApply(char a,
LCharFunction<R> func) |
static <R> R |
tryApply(char a,
LCharFunction<R> func,
ExWF<RuntimeException> exF) |
static <R> R |
tryApply(char a,
LCharFunction<R> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <R> R |
tryApplyThen(char a,
LCharFunction<R> func,
LFunction<Throwable,R> handler) |
default LCharFunction<R> |
trying(ExWF<RuntimeException> exF) |
default LCharFunction<R> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LCharFunction<R> |
tryingThen(LFunction<Throwable,R> handler) |
default R |
tupleApply(LCharSingle args) |
default LCharFunction |
untyped()
Cast that removes generics.
|
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
default R tupleApply(LCharSingle args)
default R handlingApply(char a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LCharFunction<R> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default R apply(char a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LCharFunction<R> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default R apply(char a, @Nonnull ExWF<RuntimeException> exF)
default LCharFunction<R> trying(@Nonnull ExWF<RuntimeException> exF)
default R nestingApply(char a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default R shovingApply(char a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <R> R handlingApply(char a,
LCharFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <R> R tryApply(char a,
LCharFunction<R> func)
static <R> R tryApply(char a,
LCharFunction<R> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <R> R tryApply(char a,
LCharFunction<R> func,
@Nonnull
ExWF<RuntimeException> exF)
static <R> R tryApplyThen(char a,
LCharFunction<R> func,
@Nonnull
LFunction<Throwable,R> handler)
default R failSafeApply(char a, @Nonnull LCharFunction<R> failSafe)
static <R> R failSafeApply(char a,
LCharFunction<R> func,
@Nonnull
LCharFunction<R> failSafe)
static <R> LCharFunction<R> failSafe(LCharFunction<R> func, @Nonnull LCharFunction<R> failSafe)
@Nonnull default R nonNullApply(char a)
Function call that ensures the result is not null
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacestatic <R> void fromTo(int min_i,
int max_i,
char a,
LCharFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void fromTill(int min_i,
int max_i,
char a,
LCharFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void times(int max_i,
char a,
LCharFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
default LCharFunction untyped()
Cast that removes generics.
default <V2> LCharFunction<V2> cast()
Cast that replace generics.
static <V2,R> LCharFunction<V2> cast(LCharFunction<R> function)
Cast that replace generics.
static <R> LCharFunction<R> constant(R r)
Creates function that always returns the same value.
@Nonnull static <R> LCharFunction<R> charFunc(@Nonnull LCharFunction<R> lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static <R> LCharFunction<R> recursive(@Nonnull LFunction<LCharFunction<R>,LCharFunction<R>> selfLambda)
@Nonnull static <R> LCharFunction<R> charFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <R> LCharFunction<R> charFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <R> R call(char a,
@Nonnull
LCharFunction<R> lambda)
@Nonnull static <R> LCharFunction<R> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <R> LSupplier<LCharFunction<R>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <R> LCharFunction<R> safe(@Nullable LCharFunction<R> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <R> LSupplier<LCharFunction<R>> safeSupplier(@Nullable LSupplier<LCharFunction<R>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LCharFunction<R> compose(@Nonnull LCharUnaryOperator before)
Allows to manipulate the domain of the function.
static <R> LCharFunction<R> composed(@Nonnull LCharUnaryOperator before, LCharFunction<R> after)
@Nonnull default <V> LFunction<V,R> charFuncCompose(@Nonnull LToCharFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V,R> LFunction<V,R> composed(@Nonnull LToCharFunction<? super V> before, LCharFunction<R> after)
@Nonnull default <V> LCharFunction<V> then(@Nonnull LFunction<? super R,? extends V> after)
Combines two functions together in a order.
@Nonnull default LCharConsumer thenConsume(@Nonnull LConsumer<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharFunction<R> before(@Nonnull LCharConsumer before)
@Nonnull default LCharToByteFunction thenToByte(@Nonnull LToByteFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharToSrtFunction thenToSrt(@Nonnull LToSrtFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharToIntFunction thenToInt(@Nonnull LToIntFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharToLongFunction thenToLong(@Nonnull LToLongFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharToFltFunction thenToFlt(@Nonnull LToFltFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharToDblFunction thenToDbl(@Nonnull LToDblFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharUnaryOperator thenToChar(@Nonnull LToCharFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharPredicate thenToBool(@Nonnull LPredicate<? super R> after)
Combines two functions together in a order.
@Nonnull default LCharFunction<R> nonNullable()
Converts to function that makes sure that the result is not null.
static <R> R produce(char a)
Does nothing (LCharFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.aChar> ia, C0 source, 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 <C0,I0> void iterate(SequentialRead<C0,I0,aType.aChar> sa, C0 source, 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.