@FunctionalInterface public interface LBoolFunction<R> extends MetaFunction, MetaInterface.NonThrowing, Codomain<aType.a<R>>, Domain1<aType.aBool>
Non-throwing functional interface (lambda) LBoolFunction for Java 8.
Type: function
Domain (lvl: 1): boolean a
Co-domain: R
| Modifier and Type | Interface and Description |
|---|---|
static class |
LBoolFunction.LBoolFunctionSingle<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 LBoolFunction<R> |
after(LConsumer<? super R> after) |
default R |
apply(boolean a) |
default R |
apply(boolean a,
ExWF<RuntimeException> exF) |
default R |
apply(boolean a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default R |
applyThen(boolean a,
LFunction<Throwable,R> handler) |
R |
applyX(boolean a)
Implement this, but call apply(boolean a)
|
default LBoolFunction<R> |
before(LBoolConsumer before) |
static <R> LBoolFunction<R> |
boolFunc(LBoolFunction<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> |
boolFuncCompose(LPredicate<? super V> before)
Allows to manipulate the domain of the function.
|
static <R> LBoolFunction<R> |
boolFuncThrowing(ExF<Throwable> exF) |
static <R> LBoolFunction<R> |
boolFuncThrowing(String message,
ExMF<Throwable> exF) |
static <R> R |
call(boolean a,
LBoolFunction<R> lambda) |
default LSupplier<R> |
capture(boolean a)
Captures arguments but delays the evaluation.
|
default <V2> LBoolFunction<V2> |
cast()
Cast that replace generics.
|
static <V2,R> LBoolFunction<V2> |
cast(LBoolFunction<R> function)
Cast that replace generics.
|
default LBoolFunction<R> |
compose(LLogicalOperator before)
Allows to manipulate the domain of the function.
|
static <R> LBoolFunction<R> |
composed(LLogicalOperator before,
LBoolFunction<R> after) |
static <V,R> LFunction<V,R> |
composed(LPredicate<? super V> before,
LBoolFunction<R> after) |
static <R> LBoolFunction<R> |
constant(R r)
Creates function that always returns the same value.
|
static <R> LBoolFunction<R> |
failSafe(LBoolFunction<R> func,
LBoolFunction<R> failSafe) |
default R |
failSafeApply(boolean a,
LBoolFunction<R> failSafe) |
static <R> R |
failSafeApply(boolean a,
LBoolFunction<R> func,
LBoolFunction<R> failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.aBool> 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,
boolean a,
LBoolFunction<R> func)
From-To.
|
static <R> void |
fromTo(int min_i,
int max_i,
boolean a,
LBoolFunction<R> func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LBoolFunction<R> |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default R |
handlingApply(boolean a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static <R> R |
handlingApply(boolean a,
LBoolFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.aBool> 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(boolean a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default LBoolFunction<R> |
nonNullable()
Converts to function that makes sure that the result is not null.
|
default R |
nonNullApply(boolean a)
Function call that ensures the result is not null
|
static <R> R |
produce(boolean a)
Does nothing (LBoolFunction) Function
|
static <R> LBoolFunction<R> |
recursive(LFunction<LBoolFunction<R>,LBoolFunction<R>> selfLambda) |
static <R> LBoolFunction<R> |
safe()
Safe instance.
|
static <R> LBoolFunction<R> |
safe(LBoolFunction<R> other)
Safe wrapping.
|
static <R> LSupplier<LBoolFunction<R>> |
safeSupplier()
Safe instance supplier.
|
static <R> LSupplier<LBoolFunction<R>> |
safeSupplier(LSupplier<LBoolFunction<R>> supplier)
Safe supplier.
|
default R |
shovingApply(boolean a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default <V> LBoolFunction<V> |
then(LFunction<? super R,? extends V> after)
Combines two functions together in a order.
|
default LBoolConsumer |
thenConsume(LConsumer<? super R> after)
Combines two functions together in a order.
|
default LLogicalOperator |
thenToBool(LPredicate<? super R> after)
Combines two functions together in a order.
|
default LBoolToByteFunction |
thenToByte(LToByteFunction<? super R> after)
Combines two functions together in a order.
|
default LBoolToCharFunction |
thenToChar(LToCharFunction<? super R> after)
Combines two functions together in a order.
|
default LBoolToDblFunction |
thenToDbl(LToDblFunction<? super R> after)
Combines two functions together in a order.
|
default LBoolToFltFunction |
thenToFlt(LToFltFunction<? super R> after)
Combines two functions together in a order.
|
default LBoolToIntFunction |
thenToInt(LToIntFunction<? super R> after)
Combines two functions together in a order.
|
default LBoolToLongFunction |
thenToLong(LToLongFunction<? super R> after)
Combines two functions together in a order.
|
default LBoolToSrtFunction |
thenToSrt(LToSrtFunction<? super R> after)
Combines two functions together in a order.
|
static <R> void |
times(int max_i,
boolean a,
LBoolFunction<R> func)
From-To.
|
static <R> R |
tryApply(boolean a,
LBoolFunction<R> func) |
static <R> R |
tryApply(boolean a,
LBoolFunction<R> func,
ExWF<RuntimeException> exF) |
static <R> R |
tryApply(boolean a,
LBoolFunction<R> func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static <R> R |
tryApplyThen(boolean a,
LBoolFunction<R> func,
LFunction<Throwable,R> handler) |
default LBoolFunction<R> |
trying(ExWF<RuntimeException> exF) |
default LBoolFunction<R> |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LBoolFunction<R> |
tryingThen(LFunction<Throwable,R> handler) |
default R |
tupleApply(LBoolSingle args) |
default LBoolFunction |
untyped()
Cast that removes generics.
|
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
R applyX(boolean a) throws Throwable
Implement this, but call apply(boolean a)
Throwabledefault R tupleApply(LBoolSingle args)
default R handlingApply(boolean a, HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LBoolFunction<R> handling(HandlingInstructions<Throwable,RuntimeException> handling)
default R apply(boolean a, @Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default LBoolFunction<R> trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default R apply(boolean a, @Nonnull ExWF<RuntimeException> exF)
default LBoolFunction<R> trying(@Nonnull ExWF<RuntimeException> exF)
default R nestingApply(boolean a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default R shovingApply(boolean a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static <R> R handlingApply(boolean a,
LBoolFunction<R> func,
HandlingInstructions<Throwable,RuntimeException> handling)
static <R> R tryApply(boolean a,
LBoolFunction<R> func)
static <R> R tryApply(boolean a,
LBoolFunction<R> func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static <R> R tryApply(boolean a,
LBoolFunction<R> func,
@Nonnull
ExWF<RuntimeException> exF)
static <R> R tryApplyThen(boolean a,
LBoolFunction<R> func,
@Nonnull
LFunction<Throwable,R> handler)
default R failSafeApply(boolean a, @Nonnull LBoolFunction<R> failSafe)
static <R> R failSafeApply(boolean a,
LBoolFunction<R> func,
@Nonnull
LBoolFunction<R> failSafe)
static <R> LBoolFunction<R> failSafe(LBoolFunction<R> func, @Nonnull LBoolFunction<R> failSafe)
@Nonnull default R nonNullApply(boolean 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,
boolean a,
LBoolFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void fromTill(int min_i,
int max_i,
boolean a,
LBoolFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
static <R> void times(int max_i,
boolean a,
LBoolFunction<R> func)
From-To. Intended to be used with non-capturing lambda.
default LBoolFunction untyped()
Cast that removes generics.
default <V2> LBoolFunction<V2> cast()
Cast that replace generics.
static <V2,R> LBoolFunction<V2> cast(LBoolFunction<R> function)
Cast that replace generics.
static <R> LBoolFunction<R> constant(R r)
Creates function that always returns the same value.
@Nonnull static <R> LBoolFunction<R> boolFunc(@Nonnull LBoolFunction<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> LBoolFunction<R> recursive(@Nonnull LFunction<LBoolFunction<R>,LBoolFunction<R>> selfLambda)
@Nonnull static <R> LBoolFunction<R> boolFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static <R> LBoolFunction<R> boolFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static <R> R call(boolean a,
@Nonnull
LBoolFunction<R> lambda)
@Nonnull static <R> LBoolFunction<R> safe()
Safe instance. That always returns the same value (as produce).
@Nonnull static <R> LSupplier<LBoolFunction<R>> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static <R> LBoolFunction<R> safe(@Nullable LBoolFunction<R> other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static <R> LSupplier<LBoolFunction<R>> safeSupplier(@Nullable LSupplier<LBoolFunction<R>> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LBoolFunction<R> compose(@Nonnull LLogicalOperator before)
Allows to manipulate the domain of the function.
static <R> LBoolFunction<R> composed(@Nonnull LLogicalOperator before, LBoolFunction<R> after)
@Nonnull default <V> LFunction<V,R> boolFuncCompose(@Nonnull LPredicate<? super V> before)
Allows to manipulate the domain of the function.
static <V,R> LFunction<V,R> composed(@Nonnull LPredicate<? super V> before, LBoolFunction<R> after)
@Nonnull default <V> LBoolFunction<V> then(@Nonnull LFunction<? super R,? extends V> after)
Combines two functions together in a order.
@Nonnull default LBoolConsumer thenConsume(@Nonnull LConsumer<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolFunction<R> before(@Nonnull LBoolConsumer before)
@Nonnull default LBoolToByteFunction thenToByte(@Nonnull LToByteFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolToSrtFunction thenToSrt(@Nonnull LToSrtFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolToIntFunction thenToInt(@Nonnull LToIntFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolToLongFunction thenToLong(@Nonnull LToLongFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolToFltFunction thenToFlt(@Nonnull LToFltFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolToDblFunction thenToDbl(@Nonnull LToDblFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolToCharFunction thenToChar(@Nonnull LToCharFunction<? super R> after)
Combines two functions together in a order.
@Nonnull default LLogicalOperator thenToBool(@Nonnull LPredicate<? super R> after)
Combines two functions together in a order.
@Nonnull default LBoolFunction<R> nonNullable()
Converts to function that makes sure that the result is not null.
static <R> R produce(boolean a)
Does nothing (LBoolFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.aBool> 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.aBool> 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.