E
- exception typeP1
- parameter type 1P2
- parameter type 2@FunctionalInterface public interface FragilePredicate2<E extends java.lang.Exception,P1,P2> extends FragilePredicate1<E,ITuple2<? extends P1,? extends P2>>
Compared to the standard Java BiPredicate
this functional interface allows for checked exceptions.
FragilePredicate1
Modifier and Type | Method and Description |
---|---|
default FragilePredicate2<E,P1,P2> |
and(java.util.function.BiPredicate<? super P1,? super P2> other)
Combine this and another predicate with logical and.
|
static <X extends java.lang.Exception,T1,T2> |
and(FragilePredicate2<? extends X,? super T1,? super T2> pred1,
FragilePredicate2<? extends X,? super T1,? super T2> pred2)
Get a predicate which is the combination of two predicates
with a logical and.
|
default FragilePredicate2<E,P1,P2> |
negate()
Get the negation of this predicate.
|
default FragilePredicate2<E,P1,P2> |
or(java.util.function.BiPredicate<? super P1,? super P2> other)
Combine this and another predicate with logical or.
|
static <X extends java.lang.Exception,T1,T2> |
or(FragilePredicate2<? extends X,? super T1,? super T2> pred1,
FragilePredicate2<? extends X,? super T1,? super T2> pred2)
Get a predicate which is the combination of two predicates
with a logical or.
|
default FragilePredicate1<E,P2> |
partial1(P1 argument)
Get a partially applied predicate using a fix first argument.
|
default FragilePredicate1<E,P1> |
partial2(P2 argument)
Get a partially applied predicate using a fix second argument.
|
default FragilePredicate2<E,P2,P1> |
reverseOrder()
Get a two argument predicate which expects the arguments in reverse order.
|
default boolean |
test(ITuple2<? extends P1,? extends P2> tuple2)
Expand a tuple into the arguments of this predicate.
|
boolean |
test(P1 arg1,
P2 arg2)
Decide whether the given combination of arguments evaluates to
true . |
default FragilePredicate2<E,P1,P2> |
xor(java.util.function.BiPredicate<? super P1,? super P2> other)
Combine this and another predicate with logical exclusive or.
|
static <X extends java.lang.Exception,T1,T2> |
xor(FragilePredicate2<? extends X,? super T1,? super T2> pred1,
FragilePredicate2<? extends X,? super T1,? super T2> pred2)
Get a predicate which is the combination of two predicates
with a logical exclusive or.
|
boolean test(P1 arg1, P2 arg2) throws E extends java.lang.Exception
true
.arg1
- first argumentarg2
- second argumenttrue
if the combination of the given arguments evaluates to true
,
false
otherwiseE
- checked exception thrown by implementationE extends java.lang.Exception
default boolean test(@NotNull ITuple2<? extends P1,? extends P2> tuple2) throws E extends java.lang.Exception
test
in interface FragilePredicate1<E extends java.lang.Exception,ITuple2<? extends P1,? extends P2>>
tuple2
- tuple to expandE
- checked exception thrown by implementationE extends java.lang.Exception
@NotNull default FragilePredicate2<E,P1,P2> and(@NotNull java.util.function.BiPredicate<? super P1,? super P2> other)
false
the other one is
not evaluated.other
- the other predicate to be chained with logical and@NotNull default FragilePredicate2<E,P1,P2> or(@NotNull java.util.function.BiPredicate<? super P1,? super P2> other)
true
the other one is
not evaluated.other
- other predicate to be chained with logical or@NotNull default FragilePredicate2<E,P1,P2> xor(@NotNull java.util.function.BiPredicate<? super P1,? super P2> other)
other
- other predicate to be chained with logical exclusive or@NotNull default FragilePredicate2<E,P1,P2> negate()
@NotNull default FragilePredicate1<E,P2> partial1(P1 argument)
argument
- value applied for first argument@NotNull default FragilePredicate1<E,P1> partial2(P2 argument)
argument
- value applied for second argument@NotNull default FragilePredicate2<E,P2,P1> reverseOrder()
@NotNull static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2> and(@NotNull FragilePredicate2<? extends X,? super T1,? super T2> pred1, @NotNull FragilePredicate2<? extends X,? super T1,? super T2> pred2)
The result will use shortcut evaluation, so if this
predicate already returns false
the other one is
not evaluated.
T1
- resulting type of first argument,
which is the most extending type of both pred1
's
first argument type and pred2
's first argument type,
so if neither type is extending the
other this method will not compileT2
- resulting type of second argument, see <T1>
for the fine printX
- combined exception typepred1
- first predicatepred2
- second predicateand(BiPredicate)
@NotNull static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2> or(@NotNull FragilePredicate2<? extends X,? super T1,? super T2> pred1, @NotNull FragilePredicate2<? extends X,? super T1,? super T2> pred2)
The result will use shortcut evaluation, so if this
predicate already returns true
the other one is
not evaluated.
T1
- resulting type of first argument,
which is the most extending type of both pred1
's
first argument type and pred2
's first argument type,
so if neither type is extending the
other this method will not compileT2
- resulting type of second argument, see <T1>
for the fine printX
- combined exception typepred1
- first predicatepred2
- second predicateor(BiPredicate)
@NotNull static <X extends java.lang.Exception,T1,T2> FragilePredicate2<X,T1,T2> xor(@NotNull FragilePredicate2<? extends X,? super T1,? super T2> pred1, @NotNull FragilePredicate2<? extends X,? super T1,? super T2> pred2)
The result will use shortcut evaluation, so if this
predicate already returns true
the other one is
not evaluated.
T1
- resulting type of first argument,
which is the most extending type of both pred1
's
first argument type and pred2
's first argument type,
so if neither type is extending the
other this method will not compileT2
- resulting type of second argument, see <T1>
for the fine printX
- combined exception typepred1
- first predicatepred2
- second predicatexor(BiPredicate)