Class Predicates2<T,P>
java.lang.Object
org.eclipse.collections.impl.block.factory.Predicates2<T,P>
- All Implemented Interfaces:
Serializable
,BiPredicate<T,
,P> Predicate2<T,
P>
Predicates2 is a static version of Predicates. All of its values are statically initialized, except for
and, or, not and all the attribute combination methods. Predicates2 can only work with one parameter,
so it is limited to handling only conditions of a simple nature.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Predicates2<Object,
Object> static Predicates2<Object,
Object> and
(Predicate2<? super T, ? super P> op) static <T,
P> Predicates2<T, P> and
(Predicate2<? super T, ? super P> left, Predicate2<? super T, ? super P> right) static <T> Predicates2<T,
Object> attributeEqual
(Function<? super T, ?> function) static <T,
P extends Comparable<? super P>>
Predicates2<T,P> attributeGreaterThan
(Function<? super T, ? extends P> function) static <T,
P extends Comparable<? super P>>
Predicates2<T,P> attributeGreaterThanOrEqualTo
(Function<? super T, ? extends P> function) static <T> Predicates2<T,
Iterable<?>> attributeIn
(Function<T, ?> function) static <T,
P extends Comparable<? super P>>
Predicates2<T,P> attributeLessThan
(Function<? super T, ? extends P> function) static <T,
P extends Comparable<? super P>>
Predicates2<T,P> attributeLessThanOrEqualTo
(Function<? super T, ? extends P> function) static <T> Predicates2<T,
Object> attributeNotEqual
(Function<? super T, ?> function) static <T> Predicates2<T,
Iterable<?>> attributeNotIn
(Function<T, ?> function) static Predicates2<Object,
Object> equal()
static <T extends Comparable<T>>
Predicates2<T,T> static <T extends Comparable<T>>
Predicates2<T,T> static Predicates2<Object,
Iterable<?>> in()
static Predicates2<Object,
Class<?>> static Predicates2<Object,
Object> isNull()
static <T extends Comparable<T>>
Predicates2<T,T> lessThan()
static <T extends Comparable<T>>
Predicates2<T,T> static <T,
P> Predicates2<T, P> not
(Predicate2<T, P> predicate) static Predicates2<Object,
Object> notEqual()
static Predicates2<Object,
Iterable<?>> notIn()
static Predicates2<Object,
Class<?>> static Predicates2<Object,
Object> notNull()
static Predicates2<Object,
Object> or
(Predicate2<? super T, ? super P> op) static <T,
P> Predicates2<T, P> or
(Predicate2<? super T, ? super P> left, Predicate2<? super T, ? super P> right) static Predicates2<Object,
Object> sameAs()
static <T,
P> Predicate2<T, P> throwing
(ThrowingPredicate2<T, P> throwingPredicate2) Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Predicate2 that will throw a RuntimeException, wrapping the checked exception that is the cause.static <T1,
T2> Predicate2<T1, T2> throwing
(ThrowingPredicate2<T1, T2> throwingPredicate2, Function3<T1, T2, ? super Throwable, ? extends RuntimeException> rethrow) Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Procedure2 that will throw a user specified RuntimeException based on the provided function.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiPredicate
and, negate, or
Methods inherited from interface org.eclipse.collections.api.block.predicate.Predicate2
accept, test
-
Constructor Details
-
Predicates2
public Predicates2()
-
-
Method Details
-
and
-
or
-
throwing
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Predicate2 that will throw a RuntimeException, wrapping the checked exception that is the cause. -
throwing
public static <T1,T2> Predicate2<T1,T2> throwing(ThrowingPredicate2<T1, T2> throwingPredicate2, Function3<T1, T2, ? super Throwable, ? extends RuntimeException> rethrow) Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a Procedure2 that will throw a user specified RuntimeException based on the provided function. The function is passed the current element and the checked exception that was thrown as context arguments. -
not
-
or
public static <T,P> Predicates2<T,P> or(Predicate2<? super T, ? super P> left, Predicate2<? super T, ? super P> right) -
and
public static <T,P> Predicates2<T,P> and(Predicate2<? super T, ? super P> left, Predicate2<? super T, ? super P> right) -
attributeIn
-
attributeNotIn
-
alwaysTrue
-
alwaysFalse
-
isNull
-
notNull
-
equal
-
notEqual
-
in
-
notIn
-
lessThan
-
lessThanOrEqualTo
-
greaterThan
-
sameAs
-
notSameAs
-
instanceOf
-
notInstanceOf
-
greaterThanOrEqualTo
-
attributeNotEqual
-
attributeLessThan
public static <T,P extends Comparable<? super P>> Predicates2<T,P> attributeLessThan(Function<? super T, ? extends P> function) -
attributeLessThanOrEqualTo
public static <T,P extends Comparable<? super P>> Predicates2<T,P> attributeLessThanOrEqualTo(Function<? super T, ? extends P> function) -
attributeGreaterThan
public static <T,P extends Comparable<? super P>> Predicates2<T,P> attributeGreaterThan(Function<? super T, ? extends P> function) -
attributeGreaterThanOrEqualTo
public static <T,P extends Comparable<? super P>> Predicates2<T,P> attributeGreaterThanOrEqualTo(Function<? super T, ? extends P> function) -
attributeEqual
-