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