T
- the type of input for the test(Object)
methodpublic abstract class Predicate<T> extends Object
Constructor and Description |
---|
Predicate() |
Modifier and Type | Method and Description |
---|---|
static <T> Predicate<T> |
always()
Return a predicate that is always satisfied.
|
Predicate<T> |
and(Predicate<T> other)
Obtain a new predicate that performs the logical AND of this predicate and the supplied predicate.
|
static <T> Predicate<T> |
isEqual(Object obj)
Return a predicate that is equivalent to
Objects.equals(Object, Object) called with the supplied object and the
object passed as a parameter to the test(Object) method. |
Predicate<T> |
negate()
Obtain a new predicate that performs the logical NOT of this predicate.
|
static <T> Predicate<T> |
never()
Return a predicate that is never satisfied.
|
Predicate<T> |
or(Predicate<T> other)
Obtain a new predicate that performs the logical OR of this predicate and the supplied predicate.
|
abstract boolean |
test(T input) |
public abstract boolean test(T input)
public Predicate<T> and(Predicate<T> other)
other
- the other predicatepublic Predicate<T> or(Predicate<T> other)
other
- the other predicatepublic Predicate<T> negate()
public static <T> Predicate<T> never()
public static <T> Predicate<T> always()
public static <T> Predicate<T> isEqual(Object obj)
Objects.equals(Object, Object)
called with the supplied object and the
object passed as a parameter to the test(Object)
method.obj
- the object to compare the test parametersCopyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.