@FunctionalInterface public interface LBytePredicate extends MetaPredicate, MetaInterface.NonThrowing, Codomain<aType.aBool>, Domain1<aType.aByte>
Non-throwing functional interface (lambda) LBytePredicate for Java 8.
Type: predicate
Domain (lvl: 1): byte a
Co-domain: boolean
| Modifier and Type | Interface and Description |
|---|---|
static class |
LBytePredicate.LBytePredicateSingle |
MetaInterface.NonThrowing, MetaInterface.Throwing<X>| Modifier and Type | Field and Description |
|---|---|
static String |
DESCRIPTION |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
alwaysFalse(byte a)
Returns FALSE.
|
static boolean |
alwaysTrue(byte a)
Returns TRUE.
|
default LBytePredicate |
and(LBytePredicate other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
|
default <V> LByteFunction<V> |
boolToByteFunc(LBoolFunction<? extends V> after)
Combines two functions together in a order.
|
default LBytePredicate |
boolToBytePred(LLogicalOperator after)
Combines two functions together in a order.
|
default LByteToCharFunction |
boolToByteToCharFunc(LBoolToCharFunction after)
Combines two functions together in a order.
|
default LByteToDblFunction |
boolToByteToDblFunc(LBoolToDblFunction after)
Combines two functions together in a order.
|
default LByteToFltFunction |
boolToByteToFltFunc(LBoolToFltFunction after)
Combines two functions together in a order.
|
default LByteToIntFunction |
boolToByteToIntFunc(LBoolToIntFunction after)
Combines two functions together in a order.
|
default LByteToLongFunction |
boolToByteToLongFunc(LBoolToLongFunction after)
Combines two functions together in a order.
|
default LByteToSrtFunction |
boolToByteToSrtFunc(LBoolToSrtFunction after)
Combines two functions together in a order.
|
default LByteUnaryOperator |
boolToByteUnaryOp(LBoolToByteFunction after)
Combines two functions together in a order.
|
static LBytePredicate |
bytePred(LBytePredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
|
default <V> LPredicate<V> |
bytePredCompose(LToByteFunction<? super V> before)
Allows to manipulate the domain of the function.
|
static LBytePredicate |
bytePredThrowing(ExF<Throwable> exF) |
static LBytePredicate |
bytePredThrowing(String message,
ExMF<Throwable> exF) |
static boolean |
call(byte a,
LBytePredicate lambda) |
default LBoolSupplier |
capture(byte a)
Captures arguments but delays the evaluation.
|
default LBytePredicate |
compose(LByteUnaryOperator before)
Allows to manipulate the domain of the function.
|
static LBytePredicate |
composed(LByteUnaryOperator before,
LBytePredicate after) |
static <V> LPredicate<V> |
composed(LToByteFunction<? super V> before,
LBytePredicate after) |
static LBytePredicate |
constant(boolean r)
Creates function that always returns the same value.
|
default boolean |
doApplyAsBoolean(byte a)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
|
default boolean |
doIf(byte a,
LAction action) |
default boolean |
doIf(byte a,
LByteConsumer consumer) |
static boolean |
doIf(byte a,
LBytePredicate predicate,
LAction action) |
static boolean |
doIf(byte a,
LBytePredicate predicate,
LByteConsumer consumer) |
default <V> boolean |
doIf(V a1,
byte a2,
LObjByteConsumer<V> consumer) |
default <V> boolean |
doIf(V a1,
int a2,
byte a3,
LTieByteConsumer<? super V> consumer) |
default <V> int |
doIf(V a1,
int a2,
byte a3,
LTieByteFunction<? super V> consumer) |
static LBytePredicate |
failSafe(LBytePredicate func,
LBytePredicate failSafe) |
default boolean |
failSafeTest(byte a,
LBytePredicate failSafe) |
static boolean |
failSafeTest(byte a,
LBytePredicate func,
LBytePredicate failSafe) |
default <C0> void |
filterForEach(IndexedRead<C0,aType.aByte> ia,
C0 source,
LByteConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
default <C0,I0> void |
filterIterate(SequentialRead<C0,I0,aType.aByte> sa,
C0 source,
LByteConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes.
|
static void |
fromTill(int min_i,
int max_i,
byte a,
LBytePredicate func)
From-To.
|
static void |
fromTo(int min_i,
int max_i,
byte a,
LBytePredicate func)
From-To.
|
default String |
functionalInterfaceDescription()
Returns description of the functional interface.
|
default LBytePredicate |
handling(HandlingInstructions<Throwable,RuntimeException> handling) |
default boolean |
handlingTest(byte a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
|
static boolean |
handlingTest(byte a,
LBytePredicate func,
HandlingInstructions<Throwable,RuntimeException> handling) |
static LBytePredicate |
isEqual(byte target)
Creates predicate that evaluates if an object is equal with the argument one.
|
default LBytePredicate |
negate()
Returns a predicate that represents the logical negation of this predicate.
|
default boolean |
nestingTest(byte a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
|
default boolean |
nonNullTest(byte a)
Just to mirror the method: Ensures the result is not null
|
default LBytePredicate |
or(LBytePredicate other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
|
static LBytePredicate |
recursive(LFunction<LBytePredicate,LBytePredicate> selfLambda) |
static LBytePredicate |
safe()
Safe instance.
|
static LBytePredicate |
safe(LBytePredicate other)
Safe wrapping.
|
static LSupplier<LBytePredicate> |
safeSupplier()
Safe instance supplier.
|
static LSupplier<LBytePredicate> |
safeSupplier(LSupplier<LBytePredicate> supplier)
Safe supplier.
|
default boolean |
shovingTest(byte a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
|
default boolean |
test(byte a) |
default boolean |
test(byte a,
ExWF<RuntimeException> exF) |
default boolean |
test(byte a,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default boolean |
testThen(byte a,
LPredicate<Throwable> handler) |
boolean |
testX(byte a)
Implement this, but call test(byte a)
|
static void |
throwIf(byte a,
LBytePredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
static void |
throwIfNot(byte a,
LBytePredicate pred,
ExMF<RuntimeException> factory,
String newMessage,
Object... messageParams) |
default <V,C0> int |
tieForEach(V v,
IndexedRead<C0,aType.aByte> ia,
C0 source,
LTieByteConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes.
|
default <V,C0,I0> int |
tieIterate(V v,
SequentialRead<C0,I0,aType.aByte> sa,
C0 source,
LTieByteConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes.
|
static void |
times(int max_i,
byte a,
LBytePredicate func)
From-To.
|
default LBytePredicate |
trying(ExWF<RuntimeException> exF) |
default LBytePredicate |
trying(ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
default LBytePredicate |
tryingThen(LPredicate<Throwable> handler) |
static boolean |
tryTest(byte a,
LBytePredicate func) |
static boolean |
tryTest(byte a,
LBytePredicate func,
ExWF<RuntimeException> exF) |
static boolean |
tryTest(byte a,
LBytePredicate func,
ExWMF<RuntimeException> exF,
String newMessage,
Object... messageParams) |
static boolean |
tryTestThen(byte a,
LBytePredicate func,
LPredicate<Throwable> handler) |
default boolean |
tupleTest(LByteSingle args) |
default LBytePredicate |
xor(LBytePredicate other)
Returns a predicate that represents the logical XOR of evaluation of this predicate and the argument one.
|
isPredicateisFunctionformatTo, isAction, isConsumer, isOperator, isSupplierisThrowingisThrowingstatic final String DESCRIPTION
default boolean test(byte a)
boolean testX(byte a)
throws Throwable
Implement this, but call test(byte a)
Throwabledefault boolean tupleTest(LByteSingle args)
default boolean handlingTest(byte a,
HandlingInstructions<Throwable,RuntimeException> handling)
Function call that handles exceptions according to the instructions.
default LBytePredicate handling(HandlingInstructions<Throwable,RuntimeException> handling)
default boolean test(byte a,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default LBytePredicate trying(@Nonnull ExWMF<RuntimeException> exF, @Nonnull String newMessage, @Nullable Object... messageParams)
default boolean test(byte a,
@Nonnull
ExWF<RuntimeException> exF)
default LBytePredicate trying(@Nonnull ExWF<RuntimeException> exF)
default boolean testThen(byte a,
@Nonnull
LPredicate<Throwable> handler)
default LBytePredicate tryingThen(@Nonnull LPredicate<Throwable> handler)
default boolean nestingTest(byte a)
Function call that handles exceptions by always nesting checked exceptions and propagating the others as is.
default boolean shovingTest(byte a)
Function call that handles exceptions by always propagating them as is, even when they are undeclared checked ones.
static boolean handlingTest(byte a,
LBytePredicate func,
HandlingInstructions<Throwable,RuntimeException> handling)
static boolean tryTest(byte a,
LBytePredicate func)
static boolean tryTest(byte a,
LBytePredicate func,
@Nonnull
ExWMF<RuntimeException> exF,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static boolean tryTest(byte a,
LBytePredicate func,
@Nonnull
ExWF<RuntimeException> exF)
static boolean tryTestThen(byte a,
LBytePredicate func,
@Nonnull
LPredicate<Throwable> handler)
default boolean failSafeTest(byte a,
@Nonnull
LBytePredicate failSafe)
static boolean failSafeTest(byte a,
LBytePredicate func,
@Nonnull
LBytePredicate failSafe)
static LBytePredicate failSafe(LBytePredicate func, @Nonnull LBytePredicate failSafe)
default boolean doIf(byte a,
LAction action)
static boolean doIf(byte a,
@Nonnull
LBytePredicate predicate,
@Nonnull
LAction action)
static boolean doIf(byte a,
@Nonnull
LBytePredicate predicate,
@Nonnull
LByteConsumer consumer)
default boolean doIf(byte a,
@Nonnull
LByteConsumer consumer)
static void throwIf(byte a,
LBytePredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
static void throwIfNot(byte a,
LBytePredicate pred,
ExMF<RuntimeException> factory,
@Nonnull
String newMessage,
@Nullable
Object... messageParams)
default boolean nonNullTest(byte a)
Just to mirror the method: Ensures the result is not null
default boolean doApplyAsBoolean(byte a)
For convenience, where “test()” makes things more confusing than “applyAsBoolean()”.
@Nonnull default String functionalInterfaceDescription()
Returns description of the functional interface.
functionalInterfaceDescription in interface MetaFunctionalInterfacedefault <V> boolean doIf(V a1,
byte a2,
LObjByteConsumer<V> consumer)
default <V> boolean doIf(V a1,
int a2,
byte a3,
LTieByteConsumer<? super V> consumer)
default <V> int doIf(V a1,
int a2,
byte a3,
LTieByteFunction<? super V> consumer)
static void fromTo(int min_i,
int max_i,
byte a,
LBytePredicate func)
From-To. Intended to be used with non-capturing lambda.
static void fromTill(int min_i,
int max_i,
byte a,
LBytePredicate func)
From-To. Intended to be used with non-capturing lambda.
static void times(int max_i,
byte a,
LBytePredicate func)
From-To. Intended to be used with non-capturing lambda.
default LBoolSupplier capture(byte a)
Captures arguments but delays the evaluation.
static LBytePredicate constant(boolean r)
Creates function that always returns the same value.
@Nonnull static LBytePredicate bytePred(@Nonnull LBytePredicate lambda)
Convenient method in case lambda expression is ambiguous for the compiler (that might happen for overloaded methods accepting different interfaces).
@Nonnull static LBytePredicate recursive(@Nonnull LFunction<LBytePredicate,LBytePredicate> selfLambda)
@Nonnull static LBytePredicate bytePredThrowing(@Nonnull ExF<Throwable> exF)
@Nonnull static LBytePredicate bytePredThrowing(String message, @Nonnull ExMF<Throwable> exF)
static boolean call(byte a,
@Nonnull
LBytePredicate lambda)
@Nonnull static LBytePredicate safe()
Safe instance. That always returns the same value (as alwaysFalse).
@Nonnull static LSupplier<LBytePredicate> safeSupplier()
Safe instance supplier. Returns supplier of safe() instance.
@Nonnull static LBytePredicate safe(@Nullable LBytePredicate other)
Safe wrapping. Either argument function is returned (if it is not null) or safe() instance.
@Nonnull static LSupplier<LBytePredicate> safeSupplier(@Nullable LSupplier<LBytePredicate> supplier)
Safe supplier. Either argument supplier is returned (if it is not null) or supplier of safe() instance.
@Nonnull default LBytePredicate negate()
Returns a predicate that represents the logical negation of this predicate.
java.util.function.Predicate#negate}@Nonnull default LBytePredicate and(@Nonnull LBytePredicate other)
Returns a predicate that represents the logical AND of evaluation of this predicate and the argument one.
java.util.function.Predicate#and()}@Nonnull default LBytePredicate or(@Nonnull LBytePredicate other)
Returns a predicate that represents the logical OR of evaluation of this predicate and the argument one.
java.util.function.Predicate#or}@Nonnull default LBytePredicate xor(@Nonnull LBytePredicate other)
Returns a predicate that represents the logical XOR of evaluation of this predicate and the argument one.
java.util.function.Predicate#or}@Nonnull static LBytePredicate isEqual(byte target)
Creates predicate that evaluates if an object is equal with the argument one.
java.util.function.Predicate#isEqual()@Nonnull default LBytePredicate compose(@Nonnull LByteUnaryOperator before)
Allows to manipulate the domain of the function.
static LBytePredicate composed(@Nonnull LByteUnaryOperator before, LBytePredicate after)
@Nonnull default <V> LPredicate<V> bytePredCompose(@Nonnull LToByteFunction<? super V> before)
Allows to manipulate the domain of the function.
static <V> LPredicate<V> composed(@Nonnull LToByteFunction<? super V> before, LBytePredicate after)
@Nonnull default <V> LByteFunction<V> boolToByteFunc(@Nonnull LBoolFunction<? extends V> after)
Combines two functions together in a order.
@Nonnull default LByteUnaryOperator boolToByteUnaryOp(@Nonnull LBoolToByteFunction after)
Combines two functions together in a order.
@Nonnull default LByteToSrtFunction boolToByteToSrtFunc(@Nonnull LBoolToSrtFunction after)
Combines two functions together in a order.
@Nonnull default LByteToIntFunction boolToByteToIntFunc(@Nonnull LBoolToIntFunction after)
Combines two functions together in a order.
@Nonnull default LByteToLongFunction boolToByteToLongFunc(@Nonnull LBoolToLongFunction after)
Combines two functions together in a order.
@Nonnull default LByteToFltFunction boolToByteToFltFunc(@Nonnull LBoolToFltFunction after)
Combines two functions together in a order.
@Nonnull default LByteToDblFunction boolToByteToDblFunc(@Nonnull LBoolToDblFunction after)
Combines two functions together in a order.
@Nonnull default LByteToCharFunction boolToByteToCharFunc(@Nonnull LBoolToCharFunction after)
Combines two functions together in a order.
@Nonnull default LBytePredicate boolToBytePred(@Nonnull LLogicalOperator after)
Combines two functions together in a order.
static boolean alwaysTrue(byte a)
Returns TRUE.
static boolean alwaysFalse(byte a)
Returns FALSE.
default <C0> void filterForEach(IndexedRead<C0,aType.aByte> ia, C0 source, LByteConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes. Thread safety, fail-fast, fail-safety of this method is not expected.
default <C0,I0> void filterIterate(SequentialRead<C0,I0,aType.aByte> sa, C0 source, LByteConsumer consumer)
For each element (or tuple) from arguments, calls the consumer if predicate test passes. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
default <V,C0> int tieForEach(V v,
IndexedRead<C0,aType.aByte> ia,
C0 source,
LTieByteConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes. First argument is designated as ‘target’ object. Thread safety, fail-fast, fail-safety of this method is not expected.
default <V,C0,I0> int tieIterate(V v,
SequentialRead<C0,I0,aType.aByte> sa,
C0 source,
LTieByteConsumer<V> consumer)
For each element (or tuple) from arguments, calls the consumer (with index) if predicate test passes. First argument is designated as ‘target’ object. Thread safety, fail-fast, fail-safety of this method depends highly on the arguments.
Copyright © 2019. All rights reserved.