@FunctionalInterface public interface LBoolToIntFunction extends MetaFunction, MetaInterface.NonThrowing, Codomain<aType.aInt>, Domain1<aType.aBool>
Non-throwing functional interface (lambda) LBoolToIntFunction for Java 8.
Type: function
Domain (lvl: 1): boolean a
Co-domain: int
| Modifier and Type | Interface and Description |
|---|---|
static class |
LBoolToIntFunction.LBoolToIntFunctionSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
default int |
applyAsInt(boolean a) |
default int |
applyAsInt(boolean a,
ExWF<RuntimeException> exF) |
default int |
applyAsInt(boolean a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default int |
applyAsIntThen(boolean a,
LToIntFunction<Throwable> handler) |
int |
applyAsIntX(boolean a)
Implement this, but call applyAsInt(boolean a)
|
static LBoolToIntFunction |
boolToIntFunc(LBoolToIntFunction lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LToIntFunction<V> |
boolToIntFuncCompose(LPredicate<? super V> before)
Allows to manipulate the domain of the function.
|
static LBoolToIntFunction |
boolToIntFuncThrowing(ExF<Throwable> exF) |
static LBoolToIntFunction |
boolToIntFuncThrowing(String message,
ExMF<Throwable> exF) |
static int |
call(boolean a,
LBoolToIntFunction lambda) |
default LIntSupplier |
capture(boolean a)
Captures arguments but delays the evaluation.
|
default LBoolToIntFunction |
compose(LLogicalOperator before)
Allows to manipulate the domain of the function.
|
static LBoolToIntFunction |
composed(LLogicalOperator before,
LBoolToIntFunction after) |
static <V> LToIntFunction<V> |
composed(LPredicate<? super V> before,
LBoolToIntFunction after) |
static LBoolToIntFunction |
constant(int r)
Creates function that always returns the same value.
|
static LBoolToIntFunction |
failSafe(LBoolToIntFunction func,
LBoolToIntFunction failSafe) |
default int |
failSafeApplyAsInt(boolean a,
LBoolToIntFunction failSafe) |
static int |
failSafeApplyAsInt(boolean a,
LBoolToIntFunction func,
LBoolToIntFunction failSafe) |
default <C0> void |
forEach(IndexedRead<C0,aType.aBool> ia,
C0 source,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
static void |
fromTill(int min_i,
int max_i,
boolean a,
LBoolToIntFunction func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
boolean a,
LBoolToIntFunction func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LBoolToIntFunction |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default int |
handlingApplyAsInt(boolean a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static int |
handlingApplyAsInt(boolean a,
LBoolToIntFunction func,
HandlingInstructions<Throwable,RuntimeException> handling) |
default <C0,I0> void |
iterate(SequentialRead<C0,I0,aType.aBool> sa,
C0 source,
LIntConsumer consumer)
For each element (or tuple) from arguments, calls the function and passes the result to consumer.
|
default int |
nestingApplyAsInt(boolean a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default int |
nonNullApplyAsInt(boolean a)
Just to mirror the method: Ensures the result is not null
|
static int |
produceInt(boolean a)
Does nothing (LBoolToIntFunction) Function
|
static LBoolToIntFunction |
recursive(LFunction<LBoolToIntFunction,LBoolToIntFunction> selfLambda) |
static LBoolToIntFunction |
safe()
Safe instance.
|
static LBoolToIntFunction |
safe(LBoolToIntFunction other)
Safe wrapping.
|
static LSupplier<LBoolToIntFunction> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LBoolToIntFunction> |
safeSupplier(LSupplier<LBoolToIntFunction> supplier)
Safe supplier.
|
default int |
shovingApplyAsInt(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(LIntFunction<? extends V> after)
Combines two functions together in a order.
|
default LLogicalOperator |
thenToBool(LIntPredicate after)
Combines two functions together in a order.
|
default LBoolToByteFunction |
thenToByte(LIntToByteFunction after)
Combines two functions together in a order.
|
default LBoolToCharFunction |
thenToChar(LIntToCharFunction after)
Combines two functions together in a order.
|
default LBoolToDblFunction |
thenToDbl(LIntToDblFunction after)
Combines two functions together in a order.
|
default LBoolToFltFunction |
thenToFlt(LIntToFltFunction after)
Combines two functions together in a order.
|
default LBoolToIntFunction |
thenToInt(LIntUnaryOperator after)
Combines two functions together in a order.
|
default LBoolToLongFunction |
thenToLong(LIntToLongFunction after)
Combines two functions together in a order.
|
default LBoolToSrtFunction |
thenToSrt(LIntToSrtFunction after)
Combines two functions together in a order.
|
static void |
times(int max_i,
boolean a,
LBoolToIntFunction func)
From-To.
|
static int |
tryApplyAsInt(boolean a,
LBoolToIntFunction func) |
static int |
tryApplyAsInt(boolean a,
LBoolToIntFunction func,
ExWF<RuntimeException> exF) |
static int |
tryApplyAsInt(boolean a,
LBoolToIntFunction func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static int |
tryApplyAsIntThen(boolean a,
LBoolToIntFunction func,
LToIntFunction<Throwable> handler) |
default LBoolToIntFunction |
trying(ExWF<RuntimeException> exF) |
default LBoolToIntFunction |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LBoolToIntFunction |
tryingThen(LToIntFunction<Throwable> handler) |
default int |
tupleApplyAsInt(LBoolSingle args) |
isFunctionformatTo, isAction, isConsumer, isOperator, isPredicate, isSupplierisThrowingstatic final String DESCRIPTION
default int applyAsInt(boolean a)
int applyAsIntX(boolean a)
throws Throwable
Implement this, but call applyAsInt(boolean a)
Throwabledefault int tupleApplyAsInt(LBoolSingle args)
default int handlingApplyAsInt(boolean a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LBoolToIntFunction handling(HandlingInstructions<Throwable,RuntimeException> handling)
default int applyAsInt(boolean a,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LBoolToIntFunction trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default int applyAsInt(boolean a,
@Nonnull
ExWF<RuntimeException> exF)
default LBoolToIntFunction trying(@Nonnull ExWF<RuntimeException> exF)
default int applyAsIntThen(boolean a,
@Nonnull
LToIntFunction<Throwable> handler)
default LBoolToIntFunction tryingThen(@Nonnull LToIntFunction<Throwable> handler)
default int nestingApplyAsInt(boolean a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default int shovingApplyAsInt(boolean a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static int handlingApplyAsInt(boolean a,
LBoolToIntFunction func,
HandlingInstructions<Throwable,RuntimeException> handling)
static int tryApplyAsInt(boolean a,
LBoolToIntFunction func)
static int tryApplyAsInt(boolean a,
LBoolToIntFunction func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static int tryApplyAsInt(boolean a,
LBoolToIntFunction func,
@Nonnull
ExWF<RuntimeException> exF)
static int tryApplyAsIntThen(boolean a,
LBoolToIntFunction func,
@Nonnull
LToIntFunction<Throwable> handler)
default int failSafeApplyAsInt(boolean a,
@Nonnull
LBoolToIntFunction failSafe)
static int failSafeApplyAsInt(boolean a,
LBoolToIntFunction func,
@Nonnull
LBoolToIntFunction failSafe)
static LBoolToIntFunction failSafe(LBoolToIntFunction func, @Nonnull LBoolToIntFunction failSafe)
default int nonNullApplyAsInt(boolean 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 void fromTo(int min_i,
int max_i,
boolean a,
LBoolToIntFunction func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
boolean a,
LBoolToIntFunction func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
boolean a,
LBoolToIntFunction func)
From-To. Intended to be used with non-capturing lambda.
default LIntSupplier capture(boolean a)
Captures arguments but delays the evaluation.
static LBoolToIntFunction constant(int r)
Creates function that always returns the same value.
@Nonnull static LBoolToIntFunction boolToIntFunc(@Nonnull LBoolToIntFunction lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LBoolToIntFunction recursive(@Nonnull LFunction<LBoolToIntFunction,LBoolToIntFunction> selfLambda)
@Nonnull static LBoolToIntFunction boolToIntFuncThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LBoolToIntFunction boolToIntFuncThrowing(String message, @Nonnull ExMF<Throwable> exF)
static int call(boolean a,
@Nonnull
LBoolToIntFunction lambda)
@Nonnull static LBoolToIntFunction safe()
Safe instance. That always returns the same value (as produceInt).
@Nonnull static LSupplier<LBoolToIntFunction> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LBoolToIntFunction safe(@Nullable LBoolToIntFunction other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LBoolToIntFunction> safeSupplier(@Nullable LSupplier<LBoolToIntFunction> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LBoolToIntFunction compose(@Nonnull LLogicalOperator before)
Allows to manipulate the domain of the function.
static LBoolToIntFunction composed(@Nonnull LLogicalOperator before, LBoolToIntFunction after)
@Nonnull default <V> LToIntFunction<V> boolToIntFuncCompose(@Nonnull LPredicate<? super V> before)
Allows to manipulate the domain of the function.
static <V> LToIntFunction<V> composed(@Nonnull LPredicate<? super V> before, LBoolToIntFunction after)
@Nonnull default <V> LBoolFunction<V> then(@Nonnull LIntFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LBoolToByteFunction thenToByte(@Nonnull LIntToByteFunction after)
Combines two functions together in a order.
@Nonnull default LBoolToSrtFunction thenToSrt(@Nonnull LIntToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LBoolToIntFunction thenToInt(@Nonnull LIntUnaryOperator after)
Combines two functions together in a order.
@Nonnull default LBoolToLongFunction thenToLong(@Nonnull LIntToLongFunction after)
Combines two functions together in a order.
@Nonnull default LBoolToFltFunction thenToFlt(@Nonnull LIntToFltFunction after)
Combines two functions together in a order.
@Nonnull default LBoolToDblFunction thenToDbl(@Nonnull LIntToDblFunction after)
Combines two functions together in a order.
@Nonnull default LBoolToCharFunction thenToChar(@Nonnull LIntToCharFunction after)
Combines two functions together in a order.
@Nonnull default LLogicalOperator thenToBool(@Nonnull LIntPredicate after)
Combines two functions together in a order.
static int produceInt(boolean a)
Does nothing (LBoolToIntFunction) Function
default <C0> void forEach(IndexedRead<C0,aType.aBool> ia, C0 source, LIntConsumer 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, LIntConsumer 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.