Uses of Interface org.apache.commons.collections.Predicate

Uses in package org.apache.commons.collections.set

Constructors with parameter type org.apache.commons.collections.Predicate

PredicatedSet.PredicatedSet(Set set, Predicate predicate)
Constructor that wraps (not copies).
Constructor that wraps (not copies).

Methods with parameter type org.apache.commons.collections.Predicate

Set
PredicatedSet.decorate(Set set, Predicate predicate)
Factory method to create a predicated (validating) set.
SortedSet
PredicatedSortedSet.decorate(SortedSet set, Predicate predicate)
Factory method to create a predicated (validating) sorted set.

Uses in package org.apache.commons.collections.list

Constructors with parameter type org.apache.commons.collections.Predicate

PredicatedList.PredicatedList(List list, Predicate predicate)
Constructor that wraps (not copies).

Methods with parameter type org.apache.commons.collections.Predicate

List
PredicatedList.decorate(List list, Predicate predicate)
Factory method to create a predicated (validating) list.

Uses in package org.apache.commons.collections.iterators

Constructors with parameter type org.apache.commons.collections.Predicate

FilterIterator.FilterIterator(Iterator iterator, Predicate predicate)
Constructs a new FilterIterator that will use the given iterator and predicate.
FilterListIterator.FilterListIterator(ListIterator iterator, Predicate predicate)
Constructs a new FilterListIterator.
Constructs a new FilterListIterator that will not function until setListIterator is invoked.

Methods with parameter type org.apache.commons.collections.Predicate

void
Sets the predicate this the iterator to use.
void
Sets the predicate this the iterator to use.

Methods with return type org.apache.commons.collections.Predicate

Predicate
Gets the predicate this iterator is using.
Predicate
Gets the predicate this iterator is using.

Uses in package org.apache.commons.collections.buffer

Constructors with parameter type org.apache.commons.collections.Predicate

Constructor that wraps (not copies).

Methods with parameter type org.apache.commons.collections.Predicate

Buffer
Factory method to create a predicated (validating) buffer.

Uses in package org.apache.commons.collections.bag

Constructors with parameter type org.apache.commons.collections.Predicate

Constructor that wraps (not copies).
Constructor that wraps (not copies).

Methods with parameter type org.apache.commons.collections.Predicate

Bag
Factory method to create a predicated (validating) bag.
SortedBag
Factory method to create a predicated (validating) bag.

Uses in package org.apache.commons.collections.functors

Classes implementing org.apache.commons.collections.Predicate

class
Predicate implementation that returns true if all the predicates return true.
class
Predicate implementation that returns true if both the predicates return true.
class
Predicate implementation that returns true if any of the predicates return true.
class
Predicate implementation that returns true if the input is the same object as the one stored in this predicate by equals.
class
Predicate implementation that always throws an exception.
class
Predicate implementation that always returns false.
class
Predicate implementation that returns true if the input is the same object as the one stored in this predicate.
class
Predicate implementation that returns true if the input is an instanceof the type stored in this predicate.
class
Predicate implementation that returns true if none of the predicates return true.
class
Predicate implementation that returns true if the input is not null.
class
Predicate implementation that returns the opposite of the decorated predicate.
class
Predicate implementation that throws an exception if the input is null.
class
Predicate implementation that returns false if the input is null.
class
Predicate implementation that returns true if the input is null.
class
Predicate implementation that returns true if the input is null.
class
Predicate implementation that returns true if only one of the predicates return true.
class
Predicate implementation that returns true if either of the predicates return true.
class
Predicate implementation that transforms the given object before invoking another Predicate.
class
Predicate implementation that returns the result of a transformer.
class
Predicate implementation that always returns true.
class
Predicate implementation that returns true the first time an object is passed into the predicate.

Constructors with parameter type org.apache.commons.collections.Predicate

Constructor that performs no validation.
AndPredicate.AndPredicate(Predicate predicate1, Predicate predicate2)
Constructor that performs no validation.
Constructor that performs no validation.
IfClosure.IfClosure(Predicate predicate, Closure trueClosure, Closure falseClosure)
Constructor that performs no validation.
Constructor that performs no validation.
Constructor that performs no validation.
Constructor that performs no validation.
Constructor that performs no validation.
Constructor that performs no validation.
Constructor that performs no validation.
OrPredicate.OrPredicate(Predicate predicate1, Predicate predicate2)
Constructor that performs no validation.
Constructor that performs no validation.
SwitchClosure.SwitchClosure(Predicate[] predicates, Closure[] closures, Closure defaultClosure)
Constructor that performs no validation.
SwitchTransformer.SwitchTransformer(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer)
Constructor that performs no validation.
Constructor that performs no validation.
WhileClosure.WhileClosure(Predicate predicate, Closure closure, boolean doLoop)
Constructor that performs no validation.

Fields of type org.apache.commons.collections.Predicate

Predicate
Singleton predicate instance
Predicate
Singleton predicate instance
Predicate
Singleton predicate instance
Predicate
Singleton predicate instance
Predicate
Singleton predicate instance

Methods with parameter type org.apache.commons.collections.Predicate

Predicate
Factory to create the not predicate.
Predicate
Factory to create the null exception predicate.
Predicate
Factory to create the null false predicate.
Predicate
Factory to create the null true predicate.
Transformer
Factory method that performs validation.
Closure
WhileClosure.getInstance(Predicate predicate, Closure closure, boolean doLoop)
Factory method that performs validation.
Closure
IfClosure.getInstance(Predicate predicate, Closure trueClosure, Closure falseClosure)
Factory method that performs validation.
Predicate
AndPredicate.getInstance(Predicate predicate1, Predicate predicate2)
Factory to create the predicate.
Predicate
OrPredicate.getInstance(Predicate predicate1, Predicate predicate2)
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Closure
SwitchClosure.getInstance(Predicate[] predicates, Closure[] closures, Closure defaultClosure)
Factory method that performs validation and copies the parameter arrays.
Transformer
SwitchTransformer.getInstance(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer)
Factory method that performs validation and copies the parameter arrays.
Predicate
Factory to create the predicate.

Methods with return type org.apache.commons.collections.Predicate

Predicate
Factory returning the singleton instance.
Predicate
Factory returning the singleton instance.
Predicate
Factory returning the singleton instance.
Predicate
Factory returning the singleton instance.
Predicate
Factory returning the singleton instance.
Predicate
Factory to create the predicate.
Predicate
Factory to create the identity predicate.
Predicate
AllPredicate.getInstance(Collection predicates)
Factory to create the predicate.
Predicate
AnyPredicate.getInstance(Collection predicates)
Factory to create the predicate.
Predicate
NonePredicate.getInstance(Collection predicates)
Factory to create the predicate.
Predicate
OnePredicate.getInstance(Collection predicates)
Factory to create the predicate.
Predicate
EqualPredicate.getInstance(Object object)
Factory to create the identity predicate.
Predicate
Factory to create the identity predicate.
Predicate
Factory to create the not predicate.
Predicate
Factory to create the null exception predicate.
Predicate
Factory to create the null false predicate.
Predicate
Factory to create the null true predicate.
Predicate
AndPredicate.getInstance(Predicate predicate1, Predicate predicate2)
Factory to create the predicate.
Predicate
OrPredicate.getInstance(Predicate predicate1, Predicate predicate2)
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Factory to create the predicate.
Predicate
Gets the predicate.
Predicate
Gets the predicate.
Predicate
Gets the predicate in use.
Predicate[]
Gets the predicates, do not modify the array.
Predicate[]
Gets the two predicates being decorated as an array.
Predicate[]
Gets the predicates, do not modify the array.
Predicate[]
Gets the predicates, do not modify the array.
Predicate[]
Gets the predicate being decorated.
Predicate[]
Gets the predicate being decorated.
Predicate[]
Gets the predicate being decorated.
Predicate[]
Gets the predicate being decorated.
Predicate[]
Gets the predicates, do not modify the array.
Predicate[]
Gets the two predicates being decorated as an array.
Predicate[]
Gets the predicates being decorated as an array.
Predicate[]
Gets the predicates, do not modify the array.
Predicate[]
Gets the predicates, do not modify the array.
Predicate[]
Gets the predicate being decorated.

Uses in package org.apache.commons.collections.map

Constructors with parameter type org.apache.commons.collections.Predicate

PredicatedMap.PredicatedMap(Map map, Predicate keyPredicate, Predicate valuePredicate)
Constructor that wraps (not copies).
PredicatedSortedMap.PredicatedSortedMap(SortedMap map, Predicate keyPredicate, Predicate valuePredicate)
Constructor that wraps (not copies).

Fields of type org.apache.commons.collections.Predicate

Predicate
The key predicate to use
Predicate
The value predicate to use

Methods with parameter type org.apache.commons.collections.Predicate

Map
PredicatedMap.decorate(Map map, Predicate keyPredicate, Predicate valuePredicate)
Factory method to create a predicated (validating) map.
SortedMap
PredicatedSortedMap.decorate(SortedMap map, Predicate keyPredicate, Predicate valuePredicate)
Factory method to create a predicated (validating) sorted map.

Uses in package org.apache.commons.collections.collection

Constructors with parameter type org.apache.commons.collections.Predicate

Constructor that wraps (not copies).

Fields of type org.apache.commons.collections.Predicate

Predicate
The predicate to use

Methods with parameter type org.apache.commons.collections.Predicate

Collection
PredicatedCollection.decorate(Collection coll, Predicate predicate)
Factory method to create a predicated (validating) collection.

Uses in package org.apache.commons.collections

Methods with parameter type org.apache.commons.collections.Predicate

Predicate
Create a new Predicate that returns true only if all of the specified predicates are true.
Predicate
Create a new Predicate that returns true only if both of the specified predicates are true.
Predicate
Create a new Predicate that returns true if any of the specified predicates are true.
Transformer
Creates a Transformer that calls a Predicate each time the transformer is used.
int
CollectionUtils.countMatches(Collection inputCollection, Predicate predicate)
Counts the number of elements in the input collection that match the predicate.
Closure
Creates a Closure that will call the closure once and then repeatedly until the predicate returns false.
Predicate
Create a new Predicate that returns true if one, but not both, of the specified predicates are true.
boolean
CollectionUtils.exists(Collection collection, Predicate predicate)
Answers true if a predicate is true for at least one element of a collection.
void
CollectionUtils.filter(Collection collection, Predicate predicate)
Filter the collection by applying a Predicate to each element.
Iterator
IteratorUtils.filteredIterator(Iterator iterator, Predicate predicate)
Gets an iterator that filters another iterator.
ListIterator
IteratorUtils.filteredListIterator(ListIterator listIterator, Predicate predicate)
Gets a list iterator that filters another list iterator.
Object
CollectionUtils.find(Collection collection, Predicate predicate)
Finds the first element in the given collection which matches the given predicate.
Closure
ClosureUtils.ifClosure(Predicate predicate, Closure trueClosure, Closure falseClosure)
Create a new Closure that calls one of two closures depending on the specified predicate.
Predicate
Create a new Predicate that returns true if neither of the specified predicates are true.
Predicate
Create a new Predicate that returns true if none of the specified predicates are true.
Predicate
Create a new Predicate that returns true if the specified predicate returns false and vice versa.
Predicate
Gets a Predicate that throws an exception if the input object is null, otherwise it calls the specified Predicate.
Predicate
Gets a Predicate that returns false if the input object is null, otherwise it calls the specified Predicate.
Predicate
Gets a Predicate that returns true if the input object is null, otherwise it calls the specified Predicate.
Predicate
Create a new Predicate that returns true if only one of the specified predicates are true.
Predicate
PredicateUtils.orPredicate(Predicate predicate1, Predicate predicate2)
Create a new Predicate that returns true if either of the specified predicates are true.
Bag
Returns a predicated (validating) bag backed by the given bag.
Buffer
Returns a predicated (validating) buffer backed by the given buffer.
Collection
CollectionUtils.predicatedCollection(Collection collection, Predicate predicate)
Returns a predicated (validating) collection backed by the given collection.
List
ListUtils.predicatedList(List list, Predicate predicate)
Returns a predicated (validating) list backed by the given list.
Map
MapUtils.predicatedMap(Map map, Predicate keyPred, Predicate valuePred)
Returns a predicated (validating) map backed by the given map.
Set
SetUtils.predicatedSet(Set set, Predicate predicate)
Returns a predicated (validating) set backed by the given set.
SortedBag
Returns a predicated (validating) sorted bag backed by the given sorted bag.
SortedMap
MapUtils.predicatedSortedMap(SortedMap map, Predicate keyPred, Predicate valuePred)
Returns a predicated (validating) sorted map backed by the given map.
SortedSet
SetUtils.predicatedSortedSet(SortedSet set, Predicate predicate)
Returns a predicated (validating) sorted set backed by the given sorted set.
Collection
CollectionUtils.select(Collection inputCollection, Predicate predicate)
Selects all elements from input collection which match the given predicate into an output collection.
void
CollectionUtils.select(Collection inputCollection, Predicate predicate, Collection outputCollection)
Selects all elements from input collection which match the given predicate and adds them to outputCollection.
Collection
CollectionUtils.selectRejected(Collection inputCollection, Predicate predicate)
Selects all elements from inputCollection which don't match the given predicate into an output collection.
void
CollectionUtils.selectRejected(Collection inputCollection, Predicate predicate, Collection outputCollection)
Selects all elements from inputCollection which don't match the given predicate and adds them to outputCollection.
Closure
ClosureUtils.switchClosure(Predicate[] predicates, Closure[] closures)
Create a new Closure that calls one of the closures depending on the predicates.
Closure
ClosureUtils.switchClosure(Predicate[] predicates, Closure[] closures, Closure defaultClosure)
Create a new Closure that calls one of the closures depending on the predicates.
Transformer
TransformerUtils.switchTransformer(Predicate predicate, Transformer trueTransformer, Transformer falseTransformer)
Create a new Transformer that calls one of two transformers depending on the specified predicate.
Transformer
Create a new Transformer that calls one of the transformers depending on the predicates.
Transformer
TransformerUtils.switchTransformer(Predicate[] predicates, Transformer[] transformers, Transformer defaultTransformer)
Create a new Transformer that calls one of the transformers depending on the predicates.
Predicate
Creates a predicate that transforms the input object before passing it to the predicate.
Closure
Creates a Closure that will call the closure repeatedly until the predicate returns false.

Methods with return type org.apache.commons.collections.Predicate

Predicate
PredicateUtils.allPredicate(Collection predicates)
Create a new Predicate that returns true only if all of the specified predicates are true.
Predicate
Create a new Predicate that returns true only if all of the specified predicates are true.
Predicate
Create a new Predicate that returns true only if both of the specified predicates are true.
Predicate
PredicateUtils.anyPredicate(Collection predicates)
Create a new Predicate that returns true if any of the specified predicates are true.
Predicate
Create a new Predicate that returns true if any of the specified predicates are true.
Predicate
Create a new Predicate that wraps a Transformer.
Predicate
Create a new Predicate that returns true if one, but not both, of the specified predicates are true.
Predicate
Creates a Predicate that checks if the input object is equal to the specified object using equals().
Predicate
Gets a Predicate that always throws an exception.
Predicate
Gets a Predicate that always returns false.
Predicate
Creates a Predicate that checks if the input object is equal to the specified object by identity.
Predicate
Creates a Predicate that checks if the object passed in is of a particular type, using instanceof.
Predicate
PredicateUtils.invokerPredicate(String methodName)
Creates a Predicate that invokes a method on the input object.
Predicate
PredicateUtils.invokerPredicate(String methodName, Class[] paramTypes, Object[] args)
Creates a Predicate that invokes a method on the input object.
Predicate
Create a new Predicate that returns true if neither of the specified predicates are true.
Predicate
PredicateUtils.nonePredicate(Collection predicates)
Create a new Predicate that returns true if none of the specified predicates are true.
Predicate
Create a new Predicate that returns true if none of the specified predicates are true.
Predicate
Gets a Predicate that checks if the input object passed in is not null.
Predicate
Create a new Predicate that returns true if the specified predicate returns false and vice versa.
Predicate
Gets a Predicate that throws an exception if the input object is null, otherwise it calls the specified Predicate.
Predicate
Gets a Predicate that returns false if the input object is null, otherwise it calls the specified Predicate.
Predicate
Gets a Predicate that returns true if the input object is null, otherwise it calls the specified Predicate.
Predicate
Gets a Predicate that checks if the input object passed in is null.
Predicate
PredicateUtils.onePredicate(Collection predicates)
Create a new Predicate that returns true if only one of the specified predicates are true.
Predicate
Create a new Predicate that returns true if only one of the specified predicates are true.
Predicate
PredicateUtils.orPredicate(Predicate predicate1, Predicate predicate2)
Create a new Predicate that returns true if either of the specified predicates are true.
Predicate
Creates a predicate that transforms the input object before passing it to the predicate.
Predicate
Gets a Predicate that always returns true.
Predicate
Creates a Predicate that returns true the first time an object is encountered, and false if the same object is received again.

Copyright © 2001-2006 Apache Software Foundation. All Rights Reserved.