java.io.Serializable
, java.util.function.Predicate<T>
, Predicate<T>
Predicates.AllSatisfy
, Predicates.AnySatisfy
, Predicates.NoneSatisfy
public abstract class Predicates<T> extends java.lang.Object implements Predicate<T>
Modifier and Type | Class | Description |
---|---|---|
static class |
Predicates.AllSatisfy<T> |
|
static class |
Predicates.AnySatisfy<T> |
|
static class |
Predicates.NoneSatisfy<T> |
Constructor | Description |
---|---|
Predicates() |
Modifier and Type | Method | Description |
---|---|---|
static <T> Predicates<T> |
adapt(Predicate<T> predicate) |
|
static <T> Predicates<java.lang.Iterable<T>> |
allSatisfy(Predicate<? super T> predicate) |
|
static Predicates<java.lang.Object> |
alwaysFalse() |
|
static Predicates<java.lang.Object> |
alwaysTrue() |
|
static <T> Predicates<T> |
and(java.lang.Iterable<? extends Predicate<? super T>> predicates) |
|
Predicates<T> |
and(Predicate<? super T> op) |
|
static <T> Predicates<T> |
and(Predicate<? super T>... predicates) |
|
static <T> Predicates<T> |
and(Predicate<? super T> predicate1,
Predicate<? super T> predicate2) |
|
static <T> Predicates<java.lang.Iterable<T>> |
anySatisfy(Predicate<? super T> predicate) |
|
static Predicates<java.lang.Object> |
assignableFrom(java.lang.Class<?> clazz) |
|
static <T,V> Predicates<T> |
attributeAllSatisfy(Function<? super T,? extends java.lang.Iterable<V>> function,
Predicate<? super V> predicate) |
|
static <T,V> Predicates<T> |
attributeAnySatisfy(Function<? super T,? extends java.lang.Iterable<V>> function,
Predicate<? super V> predicate) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeBetweenExclusive(Function<? super T,? extends V> function,
V from,
V to) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeBetweenInclusive(Function<? super T,? extends V> function,
V from,
V to) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeBetweenInclusiveFrom(Function<? super T,? extends V> function,
V from,
V to) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeBetweenInclusiveTo(Function<? super T,? extends V> function,
V from,
V to) |
|
static <T> Predicates<T> |
attributeEqual(Function<? super T,?> function,
java.lang.Object object) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeGreaterThan(Function<? super T,? extends V> function,
V object) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeGreaterThanOrEqualTo(Function<? super T,? extends V> function,
V object) |
|
static <T> Predicates<T> |
attributeIn(Function<? super T,?> function,
java.lang.Iterable<?> iterable) |
Creates a predicate which returns true if an attribute selected from an object passed to accept method
is contained in the iterable.
|
static <T> Predicates<T> |
attributeIsNull(Function<? super T,?> function) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeLessThan(Function<? super T,? extends V> function,
V object) |
|
static <T,V extends java.lang.Comparable<? super V>> |
attributeLessThanOrEqualTo(Function<? super T,? extends V> function,
V object) |
|
static <T,V> Predicates<T> |
attributeNoneSatisfy(Function<? super T,? extends java.lang.Iterable<V>> function,
Predicate<? super V> predicate) |
|
static <T> Predicates<T> |
attributeNotEqual(Function<? super T,?> function,
java.lang.Object object) |
|
static <T> Predicates<T> |
attributeNotIn(Function<? super T,?> function,
java.lang.Iterable<?> iterable) |
Creates a predicate which returns true if an attribute selected from an object passed to accept method
is not contained in the iterable.
|
static <T> Predicates<T> |
attributeNotNull(Function<? super T,?> function) |
|
static <T,V> Predicates<T> |
attributePredicate(Function<? super T,? extends V> function,
Predicate<? super V> predicate) |
|
static <T extends java.lang.Comparable<? super T>> |
betweenExclusive(T from,
T to) |
Creates a predicate which returns true if an object passed to accept method is within the range, exclusive
of the from and to values.
|
static <T extends java.lang.Comparable<? super T>> |
betweenInclusive(T from,
T to) |
Creates a predicate which returns true if an object passed to accept method is within the range, inclusive
of the from and to values.
|
static <T extends java.lang.Comparable<? super T>> |
betweenInclusiveFrom(T from,
T to) |
Creates a predicate which returns true if an object passed to accept method is within the range, inclusive
of the from and exclusive from the to value.
|
static <T extends java.lang.Comparable<? super T>> |
betweenInclusiveTo(T from,
T to) |
Creates a predicate which returns true if an object passed to accept method is within the range, exclusive
of the from and inclusive of the to value.
|
static <P,T> Predicate<T> |
bind(Predicate2<? super T,? super P> predicate,
P parameter) |
|
static <T> Predicate<T> |
cast(Predicate<T> predicate) |
Allows a Java 8 lambda or method reference to be used in a method taking a predicate without requiring an actual cast.
|
static Predicates<java.lang.Object> |
equal(java.lang.Object object) |
Tests for equality.
|
static <T extends java.lang.Comparable<? super T>> |
greaterThan(T object) |
|
static <T extends java.lang.Comparable<? super T>> |
greaterThanOrEqualTo(T object) |
|
static <T> Predicates<T> |
ifFalse(Function<? super T,java.lang.Boolean> function) |
|
static <T> Predicates<T> |
ifTrue(Function<? super T,java.lang.Boolean> function) |
|
static Predicates<java.lang.Object> |
in(java.lang.Iterable<?> iterable) |
Creates a predicate which returns true if an object passed to accept method is contained in the iterable.
|
static Predicates<java.lang.Object> |
in(java.lang.Object... array) |
|
static Predicates<java.lang.Object> |
instanceOf(java.lang.Class<?> clazz) |
|
static Predicates<java.lang.Object> |
isNull() |
|
static <T extends java.lang.Comparable<? super T>> |
lessThan(T object) |
|
static <T extends java.lang.Comparable<? super T>> |
lessThanOrEqualTo(T object) |
|
static <T> Predicates<T> |
neither(Predicate<? super T> operation1,
Predicate<? super T> operation2) |
|
static <T> Predicates<T> |
noneOf(java.lang.Iterable<? extends Predicate<? super T>> operations) |
|
static <T> Predicates<T> |
noneOf(Predicate<? super T>... operations) |
|
static <T> Predicates<java.lang.Iterable<T>> |
noneSatisfy(Predicate<? super T> predicate) |
|
Predicates<T> |
not() |
|
static <T> Predicates<T> |
not(Predicate<T> predicate) |
|
static Predicates<java.lang.Object> |
notEqual(java.lang.Object object) |
|
static Predicates<java.lang.Object> |
notIn(java.lang.Iterable<?> iterable) |
Creates a predicate which returns true if an object passed to accept method is not contained in
the iterable.
|
static Predicates<java.lang.Object> |
notIn(java.lang.Object... array) |
|
static Predicates<java.lang.Object> |
notInstanceOf(java.lang.Class<?> clazz) |
|
static Predicates<java.lang.Object> |
notNull() |
|
static Predicates<java.lang.Object> |
notSameAs(java.lang.Object object) |
|
static <T> Predicates<T> |
or(java.lang.Iterable<? extends Predicate<? super T>> predicates) |
|
Predicates<T> |
or(Predicate<? super T> op) |
|
static <T> Predicates<T> |
or(Predicate<? super T>... predicates) |
|
static <T> Predicates<T> |
or(Predicate<? super T> predicate1,
Predicate<? super T> predicate2) |
|
static Predicates<java.lang.Object> |
sameAs(java.lang.Object object) |
|
static Predicates<java.lang.Class<?>> |
subClass(java.lang.Class<?> aClass) |
|
static Predicates<java.lang.Class<?>> |
superClass(java.lang.Class<?> aClass) |
|
static <T> Predicate<T> |
synchronizedEach(Predicate<T> predicate) |
|
static <T> Predicate<T> |
throwing(ThrowingPredicate<T> throwingPredicate) |
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a
Predicate that will throw a RuntimeException, wrapping the checked exception that is the cause.
|
static <T> Predicate<T> |
throwing(ThrowingPredicate<T> throwingPredicate,
Function2<T,? super java.lang.Throwable,? extends java.lang.RuntimeException> rethrow) |
Allows a lambda or anonymous inner class that needs to throw a checked exception to be safely wrapped as a
Predicate that will throw a user specified RuntimeException based on the provided function.
|
public static <T> Predicates<T> adapt(Predicate<T> predicate)
public static <T> Predicate<T> cast(Predicate<T> predicate)
public static <T> Predicate<T> throwing(ThrowingPredicate<T> throwingPredicate)
public static <T> Predicate<T> throwing(ThrowingPredicate<T> throwingPredicate, Function2<T,? super java.lang.Throwable,? extends java.lang.RuntimeException> rethrow)
public static <P,T> Predicate<T> bind(Predicate2<? super T,? super P> predicate, P parameter)
public static <T> Predicates<T> or(java.lang.Iterable<? extends Predicate<? super T>> predicates)
public static <T> Predicates<T> or(Predicate<? super T> predicate1, Predicate<? super T> predicate2)
public static <T> Predicates<T> or(Predicate<? super T>... predicates)
public static <T> Predicates<T> and(java.lang.Iterable<? extends Predicate<? super T>> predicates)
public static <T> Predicates<T> and(Predicate<? super T> predicate1, Predicate<? super T> predicate2)
public static <T> Predicates<T> and(Predicate<? super T>... predicates)
public static <T> Predicates<T> not(Predicate<T> predicate)
public Predicates<T> not()
public static <T> Predicates<T> neither(Predicate<? super T> operation1, Predicate<? super T> operation2)
public static <T> Predicates<T> noneOf(Predicate<? super T>... operations)
public static <T> Predicates<T> noneOf(java.lang.Iterable<? extends Predicate<? super T>> operations)
public static Predicates<java.lang.Object> equal(java.lang.Object object)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> betweenInclusive(T from, T to)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> betweenExclusive(T from, T to)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> betweenInclusiveFrom(T from, T to)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> betweenInclusiveTo(T from, T to)
public static Predicates<java.lang.Object> in(java.lang.Iterable<?> iterable)
public static Predicates<java.lang.Object> in(java.lang.Object... array)
public static <T> Predicates<T> attributeIn(Function<? super T,?> function, java.lang.Iterable<?> iterable)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeBetweenInclusive(Function<? super T,? extends V> function, V from, V to)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeBetweenExclusive(Function<? super T,? extends V> function, V from, V to)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeBetweenInclusiveFrom(Function<? super T,? extends V> function, V from, V to)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeBetweenInclusiveTo(Function<? super T,? extends V> function, V from, V to)
public static Predicates<java.lang.Object> notIn(java.lang.Iterable<?> iterable)
public static Predicates<java.lang.Object> notIn(java.lang.Object... array)
public static <T> Predicates<T> attributeNotIn(Function<? super T,?> function, java.lang.Iterable<?> iterable)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> lessThan(T object)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeLessThan(Function<? super T,? extends V> function, V object)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> lessThanOrEqualTo(T object)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeLessThanOrEqualTo(Function<? super T,? extends V> function, V object)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> greaterThan(T object)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeGreaterThan(Function<? super T,? extends V> function, V object)
public static <T extends java.lang.Comparable<? super T>> Predicates<T> greaterThanOrEqualTo(T object)
public static <T,V extends java.lang.Comparable<? super V>> Predicates<T> attributeGreaterThanOrEqualTo(Function<? super T,? extends V> function, V object)
public static <T,V> Predicates<T> attributePredicate(Function<? super T,? extends V> function, Predicate<? super V> predicate)
public static <T> Predicates<T> attributeEqual(Function<? super T,?> function, java.lang.Object object)
public static <T> Predicates<java.lang.Iterable<T>> anySatisfy(Predicate<? super T> predicate)
public static <T> Predicates<java.lang.Iterable<T>> allSatisfy(Predicate<? super T> predicate)
public static <T> Predicates<java.lang.Iterable<T>> noneSatisfy(Predicate<? super T> predicate)
public static <T,V> Predicates<T> attributeAnySatisfy(Function<? super T,? extends java.lang.Iterable<V>> function, Predicate<? super V> predicate)
public static <T,V> Predicates<T> attributeAllSatisfy(Function<? super T,? extends java.lang.Iterable<V>> function, Predicate<? super V> predicate)
public static <T,V> Predicates<T> attributeNoneSatisfy(Function<? super T,? extends java.lang.Iterable<V>> function, Predicate<? super V> predicate)
public static Predicates<java.lang.Object> notEqual(java.lang.Object object)
public static <T> Predicates<T> ifTrue(Function<? super T,java.lang.Boolean> function)
public static <T> Predicates<T> ifFalse(Function<? super T,java.lang.Boolean> function)
public static <T> Predicates<T> attributeNotEqual(Function<? super T,?> function, java.lang.Object object)
public static Predicates<java.lang.Object> isNull()
public static <T> Predicates<T> attributeIsNull(Function<? super T,?> function)
public static Predicates<java.lang.Object> notNull()
public static <T> Predicates<T> attributeNotNull(Function<? super T,?> function)
public static Predicates<java.lang.Object> sameAs(java.lang.Object object)
public static Predicates<java.lang.Object> notSameAs(java.lang.Object object)
public static Predicates<java.lang.Object> instanceOf(java.lang.Class<?> clazz)
public static Predicates<java.lang.Object> assignableFrom(java.lang.Class<?> clazz)
public static Predicates<java.lang.Object> notInstanceOf(java.lang.Class<?> clazz)
public static Predicates<java.lang.Object> alwaysTrue()
public static Predicates<java.lang.Object> alwaysFalse()
public Predicates<T> and(Predicate<? super T> op)
public Predicates<T> or(Predicate<? super T> op)
public static Predicates<java.lang.Class<?>> subClass(java.lang.Class<?> aClass)
public static Predicates<java.lang.Class<?>> superClass(java.lang.Class<?> aClass)
Copyright © 2004–2020. All rights reserved.