public final class PredicateFunction extends Object implements Function<Boolean>, Serializable
Predicate
to the
Function interface.
Note that although this class implements
Serializable, a given instance will
only be truly Serializable if the
underlying predicate is. Attempts to serialize
an instance whose delegate is not
Serializable will result in an exception.| Constructor and Description |
|---|
PredicateFunction(Predicate predicate)
Create a new PredicateFunction.
|
| Modifier and Type | Method and Description |
|---|---|
static PredicateFunction |
adapt(Predicate predicate)
Adapt a Predicate to the Function interface.
|
boolean |
equals(Object that) |
boolean |
equals(PredicateFunction that)
Learn whether another PredicateFunction is equal to this.
|
Boolean |
evaluate()
Evaluate this function.
|
int |
hashCode() |
String |
toString() |
public PredicateFunction(Predicate predicate)
predicate - to adaptpublic Boolean evaluate()
Boolean.TRUE (Boolean.FALSE)
when the test method of my underlying
predicate returns true (false).public boolean equals(PredicateFunction that)
that - PredicateFunction to testpublic static PredicateFunction adapt(Predicate predicate)
predicate - to adaptCopyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.