com.phoenixst.collections
public class PredicateUtils extends Object
Predicates
.
This is mostly equivalent to the class of the same name in Jakarta Commons-Collections 3.0, for those classes covered by this package. No equivalent exists in version 2.1.
Since: 1.0
Version: $Revision: 1.6 $
Method Summary | |
---|---|
static Predicate | allPredicate(Predicate[] predicates)
Returns a new Predicate which is
true if all of its operand predicates are
true . |
static Predicate | allPredicate(Collection predicates)
Returns a new Predicate which is
true if all of its operand predicates are
true . |
static Predicate | andPredicate(Predicate left, Predicate right)
Returns a new Predicate which is the logical
and of the specified Predicates . |
static Predicate | anyPredicate(Predicate[] predicates)
Returns a new Predicate which is
true if any of its operand predicates are
true . |
static Predicate | anyPredicate(Collection predicates)
Returns a new Predicate which is
true if any of its operand predicates are
true . |
static Predicate | equalPredicate(Object testObject)
Returns a new Predicate which is
true if the evaluated object is
.equals() to the specified object, or if both are
null . |
static Predicate | falsePredicate()
Returns a Predicate which always returns
false . |
static Predicate | identityPredicate(Object testObject)
Returns a new Predicate which is
true if the evaluated object is the same object
(by reference) as the specified object. |
static Predicate | instanceofPredicate(Class testClass)
Returns a new Predicate which is
true if the evaluated object is of the specified
class. |
static Predicate | notPredicate(Predicate pred)
Returns a new Predicate which is the logical
converse of the specified Predicate . |
static Predicate | orPredicate(Predicate left, Predicate right)
Returns a new Predicate which is the logical
or of the specified Predicates . |
static Predicate | truePredicate()
Returns a Predicate which always returns
true . |
Predicate
which is
true
if all of its operand predicates are
true
.Predicate
which is
true
if all of its operand predicates are
true
.Predicate
which is the logical
and of the specified Predicates
.Predicate
which is
true
if any of its operand predicates are
true
.Predicate
which is
true
if any of its operand predicates are
true
.Predicate
which is
true
if the evaluated object is
.equals()
to the specified object, or if both are
null
.Predicate
which always returns
false
.Predicate
which is
true
if the evaluated object is the same object
(by reference) as the specified object.Predicate
which is
true
if the evaluated object is of the specified
class.Predicate
which is the logical
converse of the specified Predicate
.Predicate
which is the logical
or of the specified Predicates
.Predicate
which always returns
true
.