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