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.
Modifier and Type | Method and Description |
---|---|
static org.apache.commons.collections.Predicate |
allPredicate(Collection predicates)
Returns a new
Predicate which is
true if all of its operand predicates are
true . |
static org.apache.commons.collections.Predicate |
allPredicate(org.apache.commons.collections.Predicate[] predicates)
Returns a new
Predicate which is
true if all of its operand predicates are
true . |
static org.apache.commons.collections.Predicate |
andPredicate(org.apache.commons.collections.Predicate left,
org.apache.commons.collections.Predicate right)
Returns a new
Predicate which is the logical
and of the specified Predicates . |
static org.apache.commons.collections.Predicate |
anyPredicate(Collection predicates)
Returns a new
Predicate which is
true if any of its operand predicates are
true . |
static org.apache.commons.collections.Predicate |
anyPredicate(org.apache.commons.collections.Predicate[] predicates)
Returns a new
Predicate which is
true if any of its operand predicates are
true . |
static org.apache.commons.collections.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 org.apache.commons.collections.Predicate |
falsePredicate()
Returns a
Predicate which always returns
false . |
static org.apache.commons.collections.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 org.apache.commons.collections.Predicate |
instanceofPredicate(Class testClass)
Returns a new
Predicate which is
true if the evaluated object is of the specified
class. |
static org.apache.commons.collections.Predicate |
notPredicate(org.apache.commons.collections.Predicate pred)
Returns a new
Predicate which is the logical
converse of the specified Predicate . |
static org.apache.commons.collections.Predicate |
orPredicate(org.apache.commons.collections.Predicate left,
org.apache.commons.collections.Predicate right)
Returns a new
Predicate which is the logical
or of the specified Predicates . |
static org.apache.commons.collections.Predicate |
truePredicate()
Returns a
Predicate which always returns
true . |
public static org.apache.commons.collections.Predicate truePredicate()
Predicate
which always returns
true
.public static org.apache.commons.collections.Predicate falsePredicate()
Predicate
which always returns
false
.public static org.apache.commons.collections.Predicate notPredicate(org.apache.commons.collections.Predicate pred)
Predicate
which is the logical
converse of the specified Predicate
.public static org.apache.commons.collections.Predicate andPredicate(org.apache.commons.collections.Predicate left, org.apache.commons.collections.Predicate right)
Predicate
which is the logical
and of the specified Predicates
.public static org.apache.commons.collections.Predicate orPredicate(org.apache.commons.collections.Predicate left, org.apache.commons.collections.Predicate right)
Predicate
which is the logical
or of the specified Predicates
.public static org.apache.commons.collections.Predicate allPredicate(org.apache.commons.collections.Predicate[] predicates)
Predicate
which is
true
if all of its operand predicates are
true
.public static org.apache.commons.collections.Predicate allPredicate(Collection predicates)
Predicate
which is
true
if all of its operand predicates are
true
.public static org.apache.commons.collections.Predicate anyPredicate(org.apache.commons.collections.Predicate[] predicates)
Predicate
which is
true
if any of its operand predicates are
true
.public static org.apache.commons.collections.Predicate anyPredicate(Collection predicates)
Predicate
which is
true
if any of its operand predicates are
true
.public static org.apache.commons.collections.Predicate equalPredicate(Object testObject)
Predicate
which is
true
if the evaluated object is
.equals()
to the specified object, or if both are
null
.public static org.apache.commons.collections.Predicate identityPredicate(Object testObject)
Predicate
which is
true
if the evaluated object is the same object
(by reference) as the specified object.public static org.apache.commons.collections.Predicate instanceofPredicate(Class testClass)
Predicate
which is
true
if the evaluated object is of the specified
class.See the Plexus project home, hosted by SourceForge.
Copyright ? 1994-2006, by Phoenix Software Technologists, Inc. and others. All Rights Reserved. Use is subject to license terms.