Plexus v0.13.1

com.phoenixst.collections
Class PredicateUtils

java.lang.Object
  extended by com.phoenixst.collections.PredicateUtils

public class PredicateUtils
extends Object

This class contains static members related to 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 $
Author:
Ray A. Conner

Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

truePredicate

public static org.apache.commons.collections.Predicate truePredicate()
Returns a Predicate which always returns true.


falsePredicate

public static org.apache.commons.collections.Predicate falsePredicate()
Returns a Predicate which always returns false.


notPredicate

public 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.


andPredicate

public 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.


orPredicate

public 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.


allPredicate

public 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.


allPredicate

public static org.apache.commons.collections.Predicate allPredicate(Collection predicates)
Returns a new Predicate which is true if all of its operand predicates are true.


anyPredicate

public 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.


anyPredicate

public static org.apache.commons.collections.Predicate anyPredicate(Collection predicates)
Returns a new Predicate which is true if any of its operand predicates are true.


equalPredicate

public 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.


identityPredicate

public 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.


instanceofPredicate

public 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.


Plexus v0.13.1

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.