public static class LongPredicate.Util
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static LongPredicate |
and(LongPredicate p1,
LongPredicate p2)
Applies logical AND to predicates.
|
static LongPredicate |
negate(LongPredicate p1)
Applies logical negation to predicate.
|
static LongPredicate |
or(LongPredicate p1,
LongPredicate p2)
Applies logical OR to predicates.
|
static LongPredicate |
safe(ThrowableLongPredicate<java.lang.Throwable> throwablePredicate)
Creates a safe
LongPredicate. |
static LongPredicate |
safe(ThrowableLongPredicate<java.lang.Throwable> throwablePredicate,
boolean resultIfFailed)
Creates a safe
LongPredicate. |
static LongPredicate |
xor(LongPredicate p1,
LongPredicate p2)
Applies logical XOR to predicates.
|
public static LongPredicate and(@NotNull LongPredicate p1, @NotNull LongPredicate p2)
p1 - the first predicatep2 - the second predicateLongPredicatejava.lang.NullPointerException - if p1 or p2 is nullpublic static LongPredicate or(@NotNull LongPredicate p1, @NotNull LongPredicate p2)
p1 - the first predicatep2 - the second predicateLongPredicatejava.lang.NullPointerException - if p1 or p2 is nullpublic static LongPredicate xor(@NotNull LongPredicate p1, @NotNull LongPredicate p2)
p1 - the first predicatep2 - the second predicateLongPredicatejava.lang.NullPointerException - if p1 or p2 is nullpublic static LongPredicate negate(@NotNull LongPredicate p1)
p1 - the predicate to be negatedLongPredicatejava.lang.NullPointerException - if p1 is nullpublic static LongPredicate safe(@NotNull ThrowableLongPredicate<java.lang.Throwable> throwablePredicate)
LongPredicate.throwablePredicate - the predicate that may throw an exceptionLongPredicate or false if exception was thrownsafe(com.annimon.stream.function.ThrowableLongPredicate, boolean)public static LongPredicate safe(@NotNull ThrowableLongPredicate<java.lang.Throwable> throwablePredicate, boolean resultIfFailed)
LongPredicate.throwablePredicate - the predicate that may throw an exceptionresultIfFailed - the result which returned if exception was thrownLongPredicate or resultIfFailedjava.lang.NullPointerException - if throwablePredicate is null