Uses of Interface
org.apache.commons.collections.Predicate
Packages that use Predicate
Package
Description
This package contains the interfaces and utilities shared across all the subpackages of this component.
This package contains implementations of the
Buffer interface.
This package contains implementations of the
Collection interface.
This package contains implementations of the
Closure,
Predicate,
Transformer and
Factory interfaces.
This package contains implementations of the
Iterator interface.
This package contains implementations of the
List interface.-
Uses of Predicate in org.apache.commons.collections
Methods in org.apache.commons.collections that return PredicateModifier and TypeMethodDescriptionstatic PredicatePredicateUtils.allPredicate(Collection predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static PredicatePredicateUtils.allPredicate(Predicate[] predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static PredicatePredicateUtils.andPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true only if both of the specified predicates are true.static PredicatePredicateUtils.anyPredicate(Collection predicates) Create a new Predicate that returns true if any of the specified predicates are true.static PredicatePredicateUtils.anyPredicate(Predicate[] predicates) Create a new Predicate that returns true if any of the specified predicates are true.static PredicatePredicateUtils.asPredicate(Transformer transformer) Create a new Predicate that wraps a Transformer.static PredicatePredicateUtils.eitherPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true if one, but not both, of the specified predicates are true.static PredicatePredicateUtils.equalPredicate(Object value) Creates a Predicate that checks if the input object is equal to the specified object using equals().static PredicatePredicateUtils.exceptionPredicate()Gets a Predicate that always throws an exception.static PredicatePredicateUtils.falsePredicate()Gets a Predicate that always returns false.static PredicatePredicateUtils.identityPredicate(Object value) Creates a Predicate that checks if the input object is equal to the specified object by identity.static PredicatePredicateUtils.instanceofPredicate(Class type) Creates a Predicate that checks if the object passed in is of a particular type, using instanceof.static PredicatePredicateUtils.invokerPredicate(String methodName) Creates a Predicate that invokes a method on the input object.static PredicatePredicateUtils.invokerPredicate(String methodName, Class[] paramTypes, Object[] args) Creates a Predicate that invokes a method on the input object.static PredicatePredicateUtils.neitherPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true if neither of the specified predicates are true.static PredicatePredicateUtils.nonePredicate(Collection predicates) Create a new Predicate that returns true if none of the specified predicates are true.static PredicatePredicateUtils.nonePredicate(Predicate[] predicates) Create a new Predicate that returns true if none of the specified predicates are true.static PredicatePredicateUtils.notNullPredicate()Gets a Predicate that checks if the input object passed in is not null.static PredicatePredicateUtils.notPredicate(Predicate predicate) Create a new Predicate that returns true if the specified predicate returns false and vice versa.static PredicatePredicateUtils.nullIsExceptionPredicate(Predicate predicate) Gets a Predicate that throws an exception if the input object is null, otherwise it calls the specified Predicate.static PredicatePredicateUtils.nullIsFalsePredicate(Predicate predicate) Gets a Predicate that returns false if the input object is null, otherwise it calls the specified Predicate.static PredicatePredicateUtils.nullIsTruePredicate(Predicate predicate) Gets a Predicate that returns true if the input object is null, otherwise it calls the specified Predicate.static PredicatePredicateUtils.nullPredicate()Gets a Predicate that checks if the input object passed in is null.static PredicatePredicateUtils.onePredicate(Collection predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static PredicatePredicateUtils.onePredicate(Predicate[] predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static PredicatePredicateUtils.orPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true if either of the specified predicates are true.static PredicatePredicateUtils.transformedPredicate(Transformer transformer, Predicate predicate) Creates a predicate that transforms the input object before passing it to the predicate.static PredicatePredicateUtils.truePredicate()Gets a Predicate that always returns true.static PredicatePredicateUtils.uniquePredicate()Creates a Predicate that returns true the first time an object is encountered, and false if the same object is received again.Methods in org.apache.commons.collections with parameters of type PredicateModifier and TypeMethodDescriptionstatic PredicatePredicateUtils.allPredicate(Predicate[] predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static PredicatePredicateUtils.andPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true only if both of the specified predicates are true.static PredicatePredicateUtils.anyPredicate(Predicate[] predicates) Create a new Predicate that returns true if any of the specified predicates are true.static TransformerTransformerUtils.asTransformer(Predicate predicate) Creates a Transformer that calls a Predicate each time the transformer is used.static intCollectionUtils.countMatches(Collection inputCollection, Predicate predicate) Counts the number of elements in the input collection that match the predicate.static ClosureClosureUtils.doWhileClosure(Closure closure, Predicate predicate) Creates a Closure that will call the closure once and then repeatedly until the predicate returns false.static PredicatePredicateUtils.eitherPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true if one, but not both, of the specified predicates are true.static booleanCollectionUtils.exists(Collection collection, Predicate predicate) Answers true if a predicate is true for at least one element of a collection.static voidCollectionUtils.filter(Collection collection, Predicate predicate) Filter the collection by applying a Predicate to each element.static IteratorIteratorUtils.filteredIterator(Iterator iterator, Predicate predicate) Gets an iterator that filters another iterator.static ListIteratorIteratorUtils.filteredListIterator(ListIterator listIterator, Predicate predicate) Gets a list iterator that filters another list iterator.static ObjectCollectionUtils.find(Collection collection, Predicate predicate) Finds the first element in the given collection which matches the given predicate.static ClosureCreate a new Closure that calls another closure based on the result of the specified predicate.static ClosureCreate a new Closure that calls one of two closures depending on the specified predicate.static PredicatePredicateUtils.neitherPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true if neither of the specified predicates are true.static PredicatePredicateUtils.nonePredicate(Predicate[] predicates) Create a new Predicate that returns true if none of the specified predicates are true.static PredicatePredicateUtils.notPredicate(Predicate predicate) Create a new Predicate that returns true if the specified predicate returns false and vice versa.static PredicatePredicateUtils.nullIsExceptionPredicate(Predicate predicate) Gets a Predicate that throws an exception if the input object is null, otherwise it calls the specified Predicate.static PredicatePredicateUtils.nullIsFalsePredicate(Predicate predicate) Gets a Predicate that returns false if the input object is null, otherwise it calls the specified Predicate.static PredicatePredicateUtils.nullIsTruePredicate(Predicate predicate) Gets a Predicate that returns true if the input object is null, otherwise it calls the specified Predicate.static PredicatePredicateUtils.onePredicate(Predicate[] predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static PredicatePredicateUtils.orPredicate(Predicate predicate1, Predicate predicate2) Create a new Predicate that returns true if either of the specified predicates are true.static BagBagUtils.predicatedBag(Bag bag, Predicate predicate) Returns a predicated (validating) bag backed by the given bag.static BufferBufferUtils.predicatedBuffer(Buffer buffer, Predicate predicate) Returns a predicated (validating) buffer backed by the given buffer.static CollectionCollectionUtils.predicatedCollection(Collection collection, Predicate predicate) Returns a predicated (validating) collection backed by the given collection.static ListListUtils.predicatedList(List list, Predicate predicate) Returns a predicated (validating) list backed by the given list.static MapMapUtils.predicatedMap(Map map, Predicate keyPred, Predicate valuePred) Returns a predicated (validating) map backed by the given map.static SetSetUtils.predicatedSet(Set set, Predicate predicate) Returns a predicated (validating) set backed by the given set.static SortedBagBagUtils.predicatedSortedBag(SortedBag bag, Predicate predicate) Returns a predicated (validating) sorted bag backed by the given sorted bag.static SortedMapMapUtils.predicatedSortedMap(SortedMap map, Predicate keyPred, Predicate valuePred) Returns a predicated (validating) sorted map backed by the given map.static SortedSetSetUtils.predicatedSortedSet(SortedSet set, Predicate predicate) Returns a predicated (validating) sorted set backed by the given sorted set.static CollectionCollectionUtils.select(Collection inputCollection, Predicate predicate) Selects all elements from input collection which match the given predicate into an output collection.static voidCollectionUtils.select(Collection inputCollection, Predicate predicate, Collection outputCollection) Selects all elements from input collection which match the given predicate and adds them to outputCollection.static CollectionCollectionUtils.selectRejected(Collection inputCollection, Predicate predicate) Selects all elements from inputCollection which don't match the given predicate into an output collection.static voidCollectionUtils.selectRejected(Collection inputCollection, Predicate predicate, Collection outputCollection) Selects all elements from inputCollection which don't match the given predicate and adds them to outputCollection.static ClosureClosureUtils.switchClosure(Predicate[] predicates, Closure[] closures) Create a new Closure that calls one of the closures depending on the predicates.static ClosureClosureUtils.switchClosure(Predicate[] predicates, Closure[] closures, Closure defaultClosure) Create a new Closure that calls one of the closures depending on the predicates.static TransformerTransformerUtils.switchTransformer(Predicate[] predicates, Transformer[] transformers) Create a new Transformer that calls one of the transformers depending on the predicates.static TransformerTransformerUtils.switchTransformer(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer) Create a new Transformer that calls one of the transformers depending on the predicates.static TransformerTransformerUtils.switchTransformer(Predicate predicate, Transformer trueTransformer, Transformer falseTransformer) Create a new Transformer that calls one of two transformers depending on the specified predicate.static PredicatePredicateUtils.transformedPredicate(Transformer transformer, Predicate predicate) Creates a predicate that transforms the input object before passing it to the predicate.static ClosureClosureUtils.whileClosure(Predicate predicate, Closure closure) Creates a Closure that will call the closure repeatedly until the predicate returns false. -
Uses of Predicate in org.apache.commons.collections.bag
Methods in org.apache.commons.collections.bag with parameters of type PredicateModifier and TypeMethodDescriptionstatic BagFactory method to create a predicated (validating) bag.static SortedBagFactory method to create a predicated (validating) bag.Constructors in org.apache.commons.collections.bag with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedBag(Bag bag, Predicate predicate) Constructor that wraps (not copies).protectedPredicatedSortedBag(SortedBag bag, Predicate predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections.buffer
Methods in org.apache.commons.collections.buffer with parameters of type PredicateModifier and TypeMethodDescriptionstatic BufferFactory method to create a predicated (validating) buffer.Constructors in org.apache.commons.collections.buffer with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedBuffer(Buffer buffer, Predicate predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections.collection
Fields in org.apache.commons.collections.collection declared as PredicateModifier and TypeFieldDescriptionprotected final PredicatePredicatedCollection.predicateThe predicate to useMethods in org.apache.commons.collections.collection with parameters of type PredicateModifier and TypeMethodDescriptionstatic CollectionPredicatedCollection.decorate(Collection coll, Predicate predicate) Factory method to create a predicated (validating) collection.Constructors in org.apache.commons.collections.collection with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedCollection(Collection coll, Predicate predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections.functors
Subinterfaces of Predicate in org.apache.commons.collections.functorsModifier and TypeInterfaceDescriptioninterfaceDefines a predicate that decorates one or more other predicates.Classes in org.apache.commons.collections.functors that implement PredicateModifier and TypeClassDescriptionfinal classPredicate implementation that returns true if all the predicates return true.final classPredicate implementation that returns true if both the predicates return true.final classPredicate implementation that returns true if any of the predicates return true.final classPredicate implementation that returns true if the input is the same object as the one stored in this predicate by equals.final classPredicate implementation that always throws an exception.final classPredicate implementation that always returns false.final classPredicate implementation that returns true if the input is the same object as the one stored in this predicate.final classPredicate implementation that returns true if the input is an instanceof the type stored in this predicate.final classPredicate implementation that returns true if none of the predicates return true.final classPredicate implementation that returns true if the input is not null.final classPredicate implementation that returns the opposite of the decorated predicate.final classPredicate implementation that throws an exception if the input is null.final classPredicate implementation that returns false if the input is null.final classPredicate implementation that returns true if the input is null.final classPredicate implementation that returns true if the input is null.final classPredicate implementation that returns true if only one of the predicates return true.final classPredicate implementation that returns true if either of the predicates return true.final classPredicate implementation that transforms the given object before invoking anotherPredicate.final classPredicate implementation that returns the result of a transformer.final classPredicate implementation that always returns true.final classPredicate implementation that returns true the first time an object is passed into the predicate.Fields in org.apache.commons.collections.functors declared as PredicateModifier and TypeFieldDescriptionstatic final PredicateExceptionPredicate.INSTANCESingleton predicate instancestatic final PredicateFalsePredicate.INSTANCESingleton predicate instancestatic final PredicateNotNullPredicate.INSTANCESingleton predicate instancestatic final PredicateNullPredicate.INSTANCESingleton predicate instancestatic final PredicateTruePredicate.INSTANCESingleton predicate instanceMethods in org.apache.commons.collections.functors that return PredicateModifier and TypeMethodDescriptionstatic PredicateAllPredicate.getInstance(Collection predicates) Factory to create the predicate.static PredicateAllPredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateAndPredicate.getInstance(Predicate predicate1, Predicate predicate2) Factory to create the predicate.static PredicateAnyPredicate.getInstance(Collection predicates) Factory to create the predicate.static PredicateAnyPredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateEqualPredicate.getInstance(Object object) Factory to create the identity predicate.static PredicateExceptionPredicate.getInstance()Factory returning the singleton instance.static PredicateFalsePredicate.getInstance()Factory returning the singleton instance.static PredicateIdentityPredicate.getInstance(Object object) Factory to create the identity predicate.static PredicateInstanceofPredicate.getInstance(Class type) Factory to create the identity predicate.static PredicateNonePredicate.getInstance(Collection predicates) Factory to create the predicate.static PredicateNonePredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateNotNullPredicate.getInstance()Factory returning the singleton instance.static PredicateNotPredicate.getInstance(Predicate predicate) Factory to create the not predicate.static PredicateNullIsExceptionPredicate.getInstance(Predicate predicate) Factory to create the null exception predicate.static PredicateNullIsFalsePredicate.getInstance(Predicate predicate) Factory to create the null false predicate.static PredicateNullIsTruePredicate.getInstance(Predicate predicate) Factory to create the null true predicate.static PredicateNullPredicate.getInstance()Factory returning the singleton instance.static PredicateOnePredicate.getInstance(Collection predicates) Factory to create the predicate.static PredicateOnePredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateOrPredicate.getInstance(Predicate predicate1, Predicate predicate2) Factory to create the predicate.static PredicateTransformedPredicate.getInstance(Transformer transformer, Predicate predicate) Factory to create the predicate.static PredicateTransformerPredicate.getInstance(Transformer transformer) Factory to create the predicate.static PredicateTruePredicate.getInstance()Factory returning the singleton instance.static PredicateUniquePredicate.getInstance()Factory to create the predicate.IfClosure.getPredicate()Gets the predicate.PredicateTransformer.getPredicate()Gets the predicate.WhileClosure.getPredicate()Gets the predicate in use.AllPredicate.getPredicates()Gets the predicates, do not modify the array.AndPredicate.getPredicates()Gets the two predicates being decorated as an array.AnyPredicate.getPredicates()Gets the predicates, do not modify the array.NonePredicate.getPredicates()Gets the predicates, do not modify the array.NotPredicate.getPredicates()Gets the predicate being decorated.NullIsExceptionPredicate.getPredicates()Gets the predicate being decorated.NullIsFalsePredicate.getPredicates()Gets the predicate being decorated.NullIsTruePredicate.getPredicates()Gets the predicate being decorated.OnePredicate.getPredicates()Gets the predicates, do not modify the array.OrPredicate.getPredicates()Gets the two predicates being decorated as an array.PredicateDecorator.getPredicates()Gets the predicates being decorated as an array.SwitchClosure.getPredicates()Gets the predicates, do not modify the array.SwitchTransformer.getPredicates()Gets the predicates, do not modify the array.TransformedPredicate.getPredicates()Gets the predicate being decorated.Methods in org.apache.commons.collections.functors with parameters of type PredicateModifier and TypeMethodDescriptionstatic PredicateAllPredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateAndPredicate.getInstance(Predicate predicate1, Predicate predicate2) Factory to create the predicate.static PredicateAnyPredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static ClosureIfClosure.getInstance(Predicate predicate, Closure trueClosure) Factory method that performs validation.static ClosureIfClosure.getInstance(Predicate predicate, Closure trueClosure, Closure falseClosure) Factory method that performs validation.static PredicateNonePredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateNotPredicate.getInstance(Predicate predicate) Factory to create the not predicate.static PredicateNullIsExceptionPredicate.getInstance(Predicate predicate) Factory to create the null exception predicate.static PredicateNullIsFalsePredicate.getInstance(Predicate predicate) Factory to create the null false predicate.static PredicateNullIsTruePredicate.getInstance(Predicate predicate) Factory to create the null true predicate.static PredicateOnePredicate.getInstance(Predicate[] predicates) Factory to create the predicate.static PredicateOrPredicate.getInstance(Predicate predicate1, Predicate predicate2) Factory to create the predicate.static TransformerPredicateTransformer.getInstance(Predicate predicate) Factory method that performs validation.static ClosureSwitchClosure.getInstance(Predicate[] predicates, Closure[] closures, Closure defaultClosure) Factory method that performs validation and copies the parameter arrays.static TransformerSwitchTransformer.getInstance(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer) Factory method that performs validation and copies the parameter arrays.static PredicateTransformedPredicate.getInstance(Transformer transformer, Predicate predicate) Factory to create the predicate.static ClosureWhileClosure.getInstance(Predicate predicate, Closure closure, boolean doLoop) Factory method that performs validation.Constructors in org.apache.commons.collections.functors with parameters of type PredicateModifierConstructorDescriptionAllPredicate(Predicate[] predicates) Constructor that performs no validation.AndPredicate(Predicate predicate1, Predicate predicate2) Constructor that performs no validation.AnyPredicate(Predicate[] predicates) Constructor that performs no validation.Constructor that performs no validation.Constructor that performs no validation.NonePredicate(Predicate[] predicates) Constructor that performs no validation.NotPredicate(Predicate predicate) Constructor that performs no validation.NullIsExceptionPredicate(Predicate predicate) Constructor that performs no validation.NullIsFalsePredicate(Predicate predicate) Constructor that performs no validation.NullIsTruePredicate(Predicate predicate) Constructor that performs no validation.OnePredicate(Predicate[] predicates) Constructor that performs no validation.OrPredicate(Predicate predicate1, Predicate predicate2) Constructor that performs no validation.PredicateTransformer(Predicate predicate) Constructor that performs no validation.SwitchClosure(Predicate[] predicates, Closure[] closures, Closure defaultClosure) Constructor that performs no validation.SwitchTransformer(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer) Constructor that performs no validation.TransformedPredicate(Transformer transformer, Predicate predicate) Constructor that performs no validation.WhileClosure(Predicate predicate, Closure closure, boolean doLoop) Constructor that performs no validation. -
Uses of Predicate in org.apache.commons.collections.iterators
Methods in org.apache.commons.collections.iterators that return PredicateModifier and TypeMethodDescriptionFilterIterator.getPredicate()Gets the predicate this iterator is using.FilterListIterator.getPredicate()Gets the predicate this iterator is using.Methods in org.apache.commons.collections.iterators with parameters of type PredicateModifier and TypeMethodDescriptionvoidFilterIterator.setPredicate(Predicate predicate) Sets the predicate this the iterator to use.voidFilterListIterator.setPredicate(Predicate predicate) Sets the predicate this the iterator to use.Constructors in org.apache.commons.collections.iterators with parameters of type PredicateModifierConstructorDescriptionFilterIterator(Iterator iterator, Predicate predicate) Constructs a newFilterIteratorthat will use the given iterator and predicate.FilterListIterator(ListIterator iterator, Predicate predicate) Constructs a newFilterListIterator.FilterListIterator(Predicate predicate) Constructs a newFilterListIteratorthat will not function untilsetListIteratoris invoked. -
Uses of Predicate in org.apache.commons.collections.list
Methods in org.apache.commons.collections.list with parameters of type PredicateModifier and TypeMethodDescriptionstatic ListFactory method to create a predicated (validating) list.Constructors in org.apache.commons.collections.list with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedList(List list, Predicate predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections.map
Fields in org.apache.commons.collections.map declared as PredicateModifier and TypeFieldDescriptionprotected final PredicatePredicatedMap.keyPredicateThe key predicate to useprotected final PredicatePredicatedMap.valuePredicateThe value predicate to useMethods in org.apache.commons.collections.map with parameters of type PredicateModifier and TypeMethodDescriptionstatic MapFactory method to create a predicated (validating) map.static SortedMapFactory method to create a predicated (validating) sorted map.Constructors in org.apache.commons.collections.map with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedMap(Map map, Predicate keyPredicate, Predicate valuePredicate) Constructor that wraps (not copies).protectedPredicatedSortedMap(SortedMap map, Predicate keyPredicate, Predicate valuePredicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections.set
Methods in org.apache.commons.collections.set with parameters of type PredicateModifier and TypeMethodDescriptionstatic SetFactory method to create a predicated (validating) set.static SortedSetFactory method to create a predicated (validating) sorted set.Constructors in org.apache.commons.collections.set with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedSet(Set set, Predicate predicate) Constructor that wraps (not copies).protectedPredicatedSortedSet(SortedSet set, Predicate predicate) Constructor that wraps (not copies).