public static class LongPredicate.Util extends 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<Throwable> throwablePredicate)
Creates a safe
LongPredicate. |
static LongPredicate |
safe(ThrowableLongPredicate<Throwable> throwablePredicate,
boolean resultIfFailed)
Creates a safe
LongPredicate. |
static LongPredicate |
xor(LongPredicate p1,
LongPredicate p2)
Applies logical XOR to predicates.
|
public static LongPredicate and(LongPredicate p1, LongPredicate p2)
p1 - the first predicatep2 - the second predicateLongPredicateNullPointerException - if p1 or p2 is nullpublic static LongPredicate or(LongPredicate p1, LongPredicate p2)
p1 - the first predicatep2 - the second predicateLongPredicateNullPointerException - if p1 or p2 is nullpublic static LongPredicate xor(LongPredicate p1, LongPredicate p2)
p1 - the first predicatep2 - the second predicateLongPredicateNullPointerException - if p1 or p2 is nullpublic static LongPredicate negate(LongPredicate p1)
p1 - the predicate to be negatedLongPredicateNullPointerException - if p1 is nullpublic static LongPredicate safe(ThrowableLongPredicate<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(ThrowableLongPredicate<Throwable> throwablePredicate, boolean resultIfFailed)
LongPredicate.throwablePredicate - the predicate that may throw an exceptionresultIfFailed - the result which returned if exception was thrownLongPredicate or resultIfFailedNullPointerException - if throwablePredicate is nullCopyright © 2017. All rights reserved.