Uses of Interface
org.apache.commons.collections4.Predicate
Packages that use Predicate
Package
Description
Interfaces and utilities shared across all packages.
Implementations of the
Collection interface.Implements the
Iterator interface.Implements the
List interface.Implements the
MultiSet interface.Implements the
Queue interface.-
Uses of Predicate in org.apache.commons.collections4
Methods in org.apache.commons.collections4 that return PredicateModifier and TypeMethodDescriptionstatic <T> Predicate<T> PredicateUtils.allPredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static <T> Predicate<T> PredicateUtils.allPredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static <T> Predicate<T> PredicateUtils.andPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true only if both of the specified predicates are true.static <T> Predicate<T> PredicateUtils.anyPredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true if any of the specified predicates are true.static <T> Predicate<T> PredicateUtils.anyPredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true if any of the specified predicates are true.static <T> Predicate<T> PredicateUtils.asPredicate(Transformer<? super T, Boolean> transformer) Create a new Predicate that wraps a Transformer.static <T> Predicate<T> PredicateUtils.eitherPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true if one, but not both, of the specified predicates are true.static <T> Predicate<T> PredicateUtils.equalPredicate(T value) Creates a Predicate that checks if the input object is equal to the specified object using equals().static <T> Predicate<T> PredicateUtils.exceptionPredicate()Gets a Predicate that always throws an exception.static <T> Predicate<T> PredicateUtils.falsePredicate()Gets a Predicate that always returns false.static <T> Predicate<T> PredicateUtils.identityPredicate(T value) Creates a Predicate that checks if the input object is equal to the specified object by identity.PredicateUtils.instanceofPredicate(Class<?> type) Creates a Predicate that checks if the object passed in is of a particular type, using instanceof.static <T> Predicate<T> PredicateUtils.invokerPredicate(String methodName) Creates a Predicate that invokes a method on the input object.static <T> Predicate<T> PredicateUtils.invokerPredicate(String methodName, Class<?>[] paramTypes, Object[] args) Creates a Predicate that invokes a method on the input object.static <T> Predicate<T> PredicateUtils.neitherPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true if neither of the specified predicates are true.static <T> Predicate<T> PredicateUtils.nonePredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true if none of the specified predicates are true.static <T> Predicate<T> PredicateUtils.nonePredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true if none of the specified predicates are true.static <T> Predicate<T> PredicateUtils.notNullPredicate()Gets a Predicate that checks if the input object passed in is not null.static <T> Predicate<T> PredicateUtils.notPredicate(Predicate<? super T> predicate) Create a new Predicate that returns true if the specified predicate returns false and vice versa.static <T> Predicate<T> PredicateUtils.nullIsExceptionPredicate(Predicate<? super T> predicate) Gets a Predicate that throws an exception if the input object is null, otherwise it calls the specified Predicate.static <T> Predicate<T> PredicateUtils.nullIsFalsePredicate(Predicate<? super T> predicate) Gets a Predicate that returns false if the input object is null, otherwise it calls the specified Predicate.static <T> Predicate<T> PredicateUtils.nullIsTruePredicate(Predicate<? super T> predicate) Gets a Predicate that returns true if the input object is null, otherwise it calls the specified Predicate.static <T> Predicate<T> PredicateUtils.nullPredicate()Gets a Predicate that checks if the input object passed in is null.static <T> Predicate<T> PredicateUtils.onePredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static <T> Predicate<T> PredicateUtils.onePredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static <T> Predicate<T> PredicateUtils.orPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true if either of the specified predicates are true.static <T> Predicate<T> PredicateUtils.transformedPredicate(Transformer<? super T, ? extends T> transformer, Predicate<? super T> predicate) Creates a predicate that transforms the input object before passing it to the predicate.static <T> Predicate<T> PredicateUtils.truePredicate()Gets a Predicate that always returns true.static <T> Predicate<T> PredicateUtils.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.collections4 with parameters of type PredicateModifier and TypeMethodDescriptionbooleanChecks if all elements contained in this iterable are matching the provided predicate.static <T> Predicate<T> PredicateUtils.allPredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static <T> Predicate<T> PredicateUtils.andPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true only if both of the specified predicates are true.booleanChecks if this iterable contains any element matching the provided predicate.static <T> Predicate<T> PredicateUtils.anyPredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true if any of the specified predicates are true.static <T> Transformer<T, Boolean> TransformerUtils.asTransformer(Predicate<? super T> predicate) Creates a Transformer that calls a Predicate each time the transformer is used.static <C> intCollectionUtils.countMatches(Iterable<C> input, Predicate<? super C> predicate) Deprecated.static <E> longIterableUtils.countMatches(Iterable<E> input, Predicate<? super E> predicate) Counts the number of elements in the input iterable that match the predicate.static <E> Closure<E> ClosureUtils.doWhileClosure(Closure<? super E> closure, Predicate<? super E> predicate) Creates a Closure that will call the closure once and then repeatedly until the predicate returns false.static <T> Predicate<T> PredicateUtils.eitherPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true if one, but not both, of the specified predicates are true.static <C> booleanDeprecated.since 4.1, useIterableUtils.matchesAny(Iterable, Predicate)insteadstatic <T> booleanFilter the collection by applying a Predicate to each element.Returns a new FluentIterable whose iterator will only return elements from this iterable matching the provided predicate.static <E> Iterable<E> IterableUtils.filteredIterable(Iterable<E> iterable, Predicate<? super E> predicate) Returns a view of the given iterable that only contains elements matching the provided predicate.static <E> Iterator<E> IteratorUtils.filteredIterator(Iterator<? extends E> iterator, Predicate<? super E> predicate) Gets an iterator that filters another iterator.static <E> ListIterator<E> IteratorUtils.filteredListIterator(ListIterator<? extends E> listIterator, Predicate<? super E> predicate) Gets a list iterator that filters another list iterator.static <T> booleanCollectionUtils.filterInverse(Iterable<T> collection, Predicate<? super T> predicate) Filter the collection by applying a Predicate to each element.static <T> TDeprecated.since 4.1, useIterableUtils.find(Iterable, Predicate)insteadstatic <E> EFinds the first element in the given iterable which matches the given predicate.static <E> EFinds the first element in the given iterator which matches the given predicate.static <E> Closure<E> Create a new Closure that calls another closure based on the result of the specified predicate.static <E> Closure<E> ClosureUtils.ifClosure(Predicate<? super E> predicate, Closure<? super E> trueClosure, Closure<? super E> falseClosure) Create a new Closure that calls one of two closures depending on the specified predicate.static <I,O> Transformer <I, O> TransformerUtils.ifTransformer(Predicate<? super I> predicate, Transformer<? super I, ? extends O> trueTransformer, Transformer<? super I, ? extends O> falseTransformer) Create a new Transformer that calls one of two transformers depending on the specified predicate.static <T> Transformer<T, T> TransformerUtils.ifTransformer(Predicate<? super T> predicate, Transformer<? super T, ? extends T> trueTransformer) Create a new Transformer that calls the transformer if the predicate is true, otherwise the input object is returned unchanged.static <E> intReturns the index of the first element in the specified iterable that matches the given predicate.static <E> intReturns the index of the first element in the specified iterator that matches the given predicate.static <E> intFinds the first index in the given List which matches the given predicate.static <C> booleanCollectionUtils.matchesAll(Iterable<C> input, Predicate<? super C> predicate) Deprecated.since 4.1, useIterableUtils.matchesAll(Iterable, Predicate)insteadstatic <E> booleanIterableUtils.matchesAll(Iterable<E> iterable, Predicate<? super E> predicate) Answers true if a predicate is true for every element of an iterable.static <E> booleanIteratorUtils.matchesAll(Iterator<E> iterator, Predicate<? super E> predicate) Answers true if a predicate is true for every element of an iterator.static <E> booleanIterableUtils.matchesAny(Iterable<E> iterable, Predicate<? super E> predicate) Answers true if a predicate is true for any element of the iterable.static <E> booleanIteratorUtils.matchesAny(Iterator<E> iterator, Predicate<? super E> predicate) Answers true if a predicate is true for any element of the iterator.static <T> Predicate<T> PredicateUtils.neitherPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true if neither of the specified predicates are true.static <T> Predicate<T> PredicateUtils.nonePredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true if none of the specified predicates are true.static <T> Predicate<T> PredicateUtils.notPredicate(Predicate<? super T> predicate) Create a new Predicate that returns true if the specified predicate returns false and vice versa.static <T> Predicate<T> PredicateUtils.nullIsExceptionPredicate(Predicate<? super T> predicate) Gets a Predicate that throws an exception if the input object is null, otherwise it calls the specified Predicate.static <T> Predicate<T> PredicateUtils.nullIsFalsePredicate(Predicate<? super T> predicate) Gets a Predicate that returns false if the input object is null, otherwise it calls the specified Predicate.static <T> Predicate<T> PredicateUtils.nullIsTruePredicate(Predicate<? super T> predicate) Gets a Predicate that returns true if the input object is null, otherwise it calls the specified Predicate.static <T> Predicate<T> PredicateUtils.onePredicate(Predicate<? super T>... predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static <T> Predicate<T> PredicateUtils.orPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Create a new Predicate that returns true if either of the specified predicates are true.static <O,R extends Collection<O>>
List<R> IterableUtils.partition(Iterable<? extends O> iterable, Factory<R> partitionFactory, Predicate<? super O>... predicates) Partitions all elements from iterable into separate output collections, based on the evaluation of the given predicates.Partitions all elements from iterable into separate output collections, based on the evaluation of the given predicate.Partitions all elements from iterable into separate output collections, based on the evaluation of the given predicates.static <E> Bag<E> BagUtils.predicatedBag(Bag<E> bag, Predicate<? super E> predicate) Returns a predicated (validating) bag backed by the given bag.static <C> Collection<C> CollectionUtils.predicatedCollection(Collection<C> collection, Predicate<? super C> predicate) Returns a predicated (validating) collection backed by the given collection.static <E> List<E> ListUtils.predicatedList(List<E> list, Predicate<E> predicate) Returns a predicated (validating) list backed by the given list.static <K,V> IterableMap <K, V> MapUtils.predicatedMap(Map<K, V> map, Predicate<? super K> keyPred, Predicate<? super V> valuePred) Returns a predicated (validating) map backed by the given map.static <E> MultiSet<E> MultiSetUtils.predicatedMultiSet(MultiSet<E> multiset, Predicate<? super E> predicate) Returns a predicated (validating) multiset backed by the given multiset.static <E> SortedSet<E> SetUtils.predicatedNavigableSet(NavigableSet<E> set, Predicate<? super E> predicate) Returns a predicated (validating) navigable set backed by the given navigable set.static <E> Queue<E> QueueUtils.predicatedQueue(Queue<E> queue, Predicate<? super E> predicate) Returns a predicated (validating) queue backed by the given queue.static <E> Set<E> SetUtils.predicatedSet(Set<E> set, Predicate<? super E> predicate) Returns a predicated (validating) set backed by the given set.static <E> SortedBag<E> BagUtils.predicatedSortedBag(SortedBag<E> bag, Predicate<? super E> predicate) Returns a predicated (validating) sorted bag backed by the given sorted bag.static <K,V> SortedMap <K, V> MapUtils.predicatedSortedMap(SortedMap<K, V> map, Predicate<? super K> keyPred, Predicate<? super V> valuePred) Returns a predicated (validating) sorted map backed by the given map.static <E> SortedSet<E> SetUtils.predicatedSortedSet(SortedSet<E> set, Predicate<? super E> predicate) Returns a predicated (validating) sorted set backed by the given sorted set.static <O> Collection<O> Selects all elements from input collection which match the given predicate into an output collection.static <O,R extends Collection<? super O>>
RCollectionUtils.select(Iterable<? extends O> inputCollection, Predicate<? super O> predicate, R outputCollection) Selects all elements from input collection which match the given predicate and adds them to outputCollection.static <O,R extends Collection<? super O>>
RCollectionUtils.select(Iterable<? extends O> inputCollection, Predicate<? super O> predicate, R outputCollection, R rejectedCollection) Selects all elements from inputCollection into an output and rejected collection, based on the evaluation of the given predicate.static <E> List<E> ListUtils.select(Collection<? extends E> inputCollection, Predicate<? super E> predicate) Selects all elements from input collection which match the given predicate into an output list.static <O> Collection<O> CollectionUtils.selectRejected(Iterable<? extends O> inputCollection, Predicate<? super O> predicate) Selects all elements from inputCollection which don't match the given predicate into an output collection.static <O,R extends Collection<? super O>>
RCollectionUtils.selectRejected(Iterable<? extends O> inputCollection, Predicate<? super O> predicate, R outputCollection) Selects all elements from inputCollection which don't match the given predicate and adds them to outputCollection.static <E> List<E> ListUtils.selectRejected(Collection<? extends E> inputCollection, Predicate<? super E> predicate) Selects all elements from inputCollection which don't match the given predicate into an output collection.static <O> Collection<O> Returns a newCollectioncontaining a minus a subset of b.static <E> Closure<E> ClosureUtils.switchClosure(Predicate<? super E>[] predicates, Closure<? super E>[] closures) Create a new Closure that calls one of the closures depending on the predicates.static <E> Closure<E> ClosureUtils.switchClosure(Predicate<? super E>[] predicates, Closure<? super E>[] closures, Closure<? super E> defaultClosure) Create a new Closure that calls one of the closures depending on the predicates.static <I,O> Transformer <I, O> TransformerUtils.switchTransformer(Predicate<? super I>[] predicates, Transformer<? super I, ? extends O>[] transformers) Create a new Transformer that calls one of the transformers depending on the predicates.static <I,O> Transformer <I, O> TransformerUtils.switchTransformer(Predicate<? super I>[] predicates, Transformer<? super I, ? extends O>[] transformers, Transformer<? super I, ? extends O> defaultTransformer) Create a new Transformer that calls one of the transformers depending on the predicates.static <I,O> Transformer <I, O> TransformerUtils.switchTransformer(Predicate<? super I> predicate, Transformer<? super I, ? extends O> trueTransformer, Transformer<? super I, ? extends O> falseTransformer) Deprecated.static <T> Predicate<T> PredicateUtils.transformedPredicate(Transformer<? super T, ? extends T> transformer, Predicate<? super T> predicate) Creates a predicate that transforms the input object before passing it to the predicate.static <E> Closure<E> ClosureUtils.whileClosure(Predicate<? super E> predicate, Closure<? super E> closure) Creates a Closure that will call the closure repeatedly until the predicate returns false.Method parameters in org.apache.commons.collections4 with type arguments of type PredicateModifier and TypeMethodDescriptionstatic <T> Predicate<T> PredicateUtils.allPredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true only if all of the specified predicates are true.static <T> Predicate<T> PredicateUtils.anyPredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true if any of the specified predicates are true.static <T> Predicate<T> PredicateUtils.nonePredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true if none of the specified predicates are true.static <T> Predicate<T> PredicateUtils.onePredicate(Collection<? extends Predicate<? super T>> predicates) Create a new Predicate that returns true if only one of the specified predicates are true.static <E> Closure<E> ClosureUtils.switchClosure(Map<Predicate<E>, Closure<E>> predicatesAndClosures) Create a new Closure that calls one of the closures depending on the predicates.static <I,O> Transformer <I, O> TransformerUtils.switchTransformer(Map<Predicate<I>, Transformer<I, O>> predicatesAndTransformers) Create a new Transformer that calls one of the transformers depending on the predicates. -
Uses of Predicate in org.apache.commons.collections4.bag
Methods in org.apache.commons.collections4.bag with parameters of type PredicateModifier and TypeMethodDescriptionstatic <E> PredicatedBag<E> PredicatedBag.predicatedBag(Bag<E> bag, Predicate<? super E> predicate) Factory method to create a predicated (validating) bag.static <E> PredicatedSortedBag<E> PredicatedSortedBag.predicatedSortedBag(SortedBag<E> bag, Predicate<? super E> predicate) Factory method to create a predicated (validating) bag.Constructors in org.apache.commons.collections4.bag with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedBag(Bag<E> bag, Predicate<? super E> predicate) Constructor that wraps (not copies).protectedPredicatedSortedBag(SortedBag<E> bag, Predicate<? super E> predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections4.collection
Fields in org.apache.commons.collections4.collection declared as PredicateMethods in org.apache.commons.collections4.collection with parameters of type PredicateModifier and TypeMethodDescriptionstatic <E> PredicatedCollection.Builder<E> Returns a Builder with the given predicate.static <T> PredicatedCollection<T> PredicatedCollection.predicatedCollection(Collection<T> coll, Predicate<? super T> predicate) Factory method to create a predicated (validating) collection.Constructors in org.apache.commons.collections4.collection with parameters of type PredicateModifierConstructorDescriptionConstructs a PredicatedCollectionBuilder with the specified Predicate.protectedPredicatedCollection(Collection<E> collection, Predicate<? super E> predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections4.functors
Subinterfaces of Predicate in org.apache.commons.collections4.functorsModifier and TypeInterfaceDescriptioninterfaceDefines a predicate that decorates one or more other predicates.Classes in org.apache.commons.collections4.functors that implement PredicateModifier and TypeClassDescriptionclassAbstract base class for predicates.classAbstract base class for quantification predicates, for example All, Any, None.final classAllPredicate<T>Predicate implementation that returns true if all the predicates return true.final classAndPredicate<T>Predicate implementation that returns true if both the predicates return true.final classAnyPredicate<T>Predicate implementation that returns true if any of the predicates return true.classPredicate that compares the input object with the one stored in the predicate using a comparator.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 classNotPredicate<T>Predicate 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 classOnePredicate<T>Predicate implementation that returns true if only one of the predicates return true.final classOrPredicate<T>Predicate 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.collections4.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 instanceAbstractQuantifierPredicate.iPredicatesThe array of predicates to callMethods in org.apache.commons.collections4.functors that return PredicateModifier and TypeMethodDescriptionstatic <T> Predicate<T> AllPredicate.allPredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> AllPredicate.allPredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> AndPredicate.andPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Creates the predicate.static <T> Predicate<T> AnyPredicate.anyPredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> AnyPredicate.anyPredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> ComparatorPredicate.comparatorPredicate(T object, Comparator<T> comparator) Creates the comparator predicatestatic <T> Predicate<T> ComparatorPredicate.comparatorPredicate(T object, Comparator<T> comparator, ComparatorPredicate.Criterion criterion) Creates the comparator predicatestatic <T> Predicate<T> EqualPredicate.equalPredicate(T object) Creates the predicate.static <T> Predicate<T> EqualPredicate.equalPredicate(T object, Equator<T> equator) Creates the identity predicate.static <T> Predicate<T> ExceptionPredicate.exceptionPredicate()Factory returning the singleton instance.static <T> Predicate<T> FalsePredicate.falsePredicate()Gets a typed instance.IfClosure.getPredicate()Gets the predicate.IfTransformer.getPredicate()Gets the predicate.PredicateTransformer.getPredicate()Gets the predicate.WhileClosure.getPredicate()Gets the predicate in use.AbstractQuantifierPredicate.getPredicates()Gets the predicates.AndPredicate.getPredicates()Gets the two predicates being decorated as an 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.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.SwitchTransformer.getPredicates()Gets the predicates.TransformedPredicate.getPredicates()Gets the predicate being decorated.static <T> Predicate<T> IdentityPredicate.identityPredicate(T object) Creates the identity predicate.InstanceofPredicate.instanceOfPredicate(Class<?> type) Creates the identity predicate.static <T> Predicate<T> NonePredicate.nonePredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> NonePredicate.nonePredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> NotNullPredicate.notNullPredicate()Factory returning the singleton instance.static <T> Predicate<T> NotPredicate.notPredicate(Predicate<? super T> predicate) Creates the not predicate.static <T> Predicate<T> NullIsExceptionPredicate.nullIsExceptionPredicate(Predicate<? super T> predicate) Creates the null exception predicate.static <T> Predicate<T> NullIsFalsePredicate.nullIsFalsePredicate(Predicate<? super T> predicate) Creates the null false predicate.static <T> Predicate<T> NullIsTruePredicate.nullIsTruePredicate(Predicate<? super T> predicate) Creates the null true predicate.static <T> Predicate<T> NullPredicate.nullPredicate()Factory returning the singleton instance.static <T> Predicate<T> OnePredicate.onePredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> OnePredicate.onePredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> OrPredicate.orPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Creates the predicate.static <T> Predicate<T> TransformedPredicate.transformedPredicate(Transformer<? super T, ? extends T> transformer, Predicate<? super T> predicate) Creates the predicate.static <T> Predicate<T> TransformerPredicate.transformerPredicate(Transformer<? super T, Boolean> transformer) Creates the predicate.static <T> Predicate<T> TruePredicate.truePredicate()Factory returning the singleton instance.static <T> Predicate<T> UniquePredicate.uniquePredicate()Creates the predicate.Methods in org.apache.commons.collections4.functors with parameters of type PredicateModifier and TypeMethodDescriptionstatic <T> Predicate<T> AllPredicate.allPredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> AndPredicate.andPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Creates the predicate.static <T> Predicate<T> AnyPredicate.anyPredicate(Predicate<? super T>... predicates) Creates the predicate.static <E> Closure<E> Factory method that performs validation.static <E> Closure<E> IfClosure.ifClosure(Predicate<? super E> predicate, Closure<? super E> trueClosure, Closure<? super E> falseClosure) Factory method that performs validation.static <I,O> Transformer <I, O> IfTransformer.ifTransformer(Predicate<? super I> predicate, Transformer<? super I, ? extends O> trueTransformer, Transformer<? super I, ? extends O> falseTransformer) Factory method that performs validation.static <T> Transformer<T, T> IfTransformer.ifTransformer(Predicate<? super T> predicate, Transformer<? super T, ? extends T> trueTransformer) Factory method that performs validation.static <T> Predicate<T> NonePredicate.nonePredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> NotPredicate.notPredicate(Predicate<? super T> predicate) Creates the not predicate.static <T> Predicate<T> NullIsExceptionPredicate.nullIsExceptionPredicate(Predicate<? super T> predicate) Creates the null exception predicate.static <T> Predicate<T> NullIsFalsePredicate.nullIsFalsePredicate(Predicate<? super T> predicate) Creates the null false predicate.static <T> Predicate<T> NullIsTruePredicate.nullIsTruePredicate(Predicate<? super T> predicate) Creates the null true predicate.static <T> Predicate<T> OnePredicate.onePredicate(Predicate<? super T>... predicates) Creates the predicate.static <T> Predicate<T> OrPredicate.orPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Creates the predicate.static <T> Transformer<T, Boolean> PredicateTransformer.predicateTransformer(Predicate<? super T> predicate) Factory method that performs validation.static <E> Closure<E> SwitchClosure.switchClosure(Predicate<? super E>[] predicates, Closure<? super E>[] closures, Closure<? super E> defaultClosure) Factory method that performs validation and copies the parameter arrays.static <I,O> Transformer <I, O> SwitchTransformer.switchTransformer(Predicate<? super I>[] predicates, Transformer<? super I, ? extends O>[] transformers, Transformer<? super I, ? extends O> defaultTransformer) Factory method that performs validation and copies the parameter arrays.static <T> Predicate<T> TransformedPredicate.transformedPredicate(Transformer<? super T, ? extends T> transformer, Predicate<? super T> predicate) Creates the predicate.static <E> Closure<E> WhileClosure.whileClosure(Predicate<? super E> predicate, Closure<? super E> closure, boolean doLoop) Factory method that performs validation.Method parameters in org.apache.commons.collections4.functors with type arguments of type PredicateModifier and TypeMethodDescriptionstatic <T> Predicate<T> AllPredicate.allPredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> AnyPredicate.anyPredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> NonePredicate.nonePredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <T> Predicate<T> OnePredicate.onePredicate(Collection<? extends Predicate<? super T>> predicates) Creates the predicate.static <E> Closure<E> SwitchClosure.switchClosure(Map<Predicate<E>, Closure<E>> predicatesAndClosures) Create a new Closure that calls one of the closures depending on the predicates.static <I,O> Transformer <I, O> SwitchTransformer.switchTransformer(Map<? extends Predicate<? super I>, ? extends Transformer<? super I, ? extends O>> map) Create a new Transformer that calls one of the transformers depending on the predicates.Constructors in org.apache.commons.collections4.functors with parameters of type PredicateModifierConstructorDescriptionAbstractQuantifierPredicate(Predicate<? super T>... predicates) Constructor that performs no validation.AllPredicate(Predicate<? super T>... predicates) Constructor that performs no validation.AndPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Constructor that performs no validation.AnyPredicate(Predicate<? super T>... predicates) Constructor that performs no validation.Constructor that performs no validation.IfClosure(Predicate<? super T> predicate, Closure<? super T> trueClosure, Closure<? super T> falseClosure) Constructor that performs no validation.IfTransformer(Predicate<? super T> predicate, Transformer<? super T, ? extends R> trueTransformer, Transformer<? super T, ? extends R> falseTransformer) Constructor that performs no validation.NonePredicate(Predicate<? super T>... predicates) Constructor that performs no validation.NotPredicate(Predicate<? super T> predicate) Constructor that performs no validation.NullIsExceptionPredicate(Predicate<? super T> predicate) Constructor that performs no validation.NullIsFalsePredicate(Predicate<? super T> predicate) Constructor that performs no validation.NullIsTruePredicate(Predicate<? super T> predicate) Constructor that performs no validation.OnePredicate(Predicate<? super T>... predicates) Constructor that performs no validation.OrPredicate(Predicate<? super T> predicate1, Predicate<? super T> predicate2) Constructor that performs no validation.PredicateTransformer(Predicate<? super T> predicate) Constructor that performs no validation.SwitchClosure(Predicate<? super T>[] predicates, Closure<? super T>[] closures, Closure<? super T> defaultClosure) Constructor that performs no validation.SwitchTransformer(Predicate<? super T>[] predicates, Transformer<? super T, ? extends R>[] transformers, Transformer<? super T, ? extends R> defaultTransformer) Constructor that performs no validation.TransformedPredicate(Transformer<? super T, ? extends T> transformer, Predicate<? super T> predicate) Constructor that performs no validation.WhileClosure(Predicate<? super T> predicate, Closure<? super T> closure, boolean doLoop) Constructor that performs no validation. -
Uses of Predicate in org.apache.commons.collections4.iterators
Methods in org.apache.commons.collections4.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.collections4.iterators with parameters of type PredicateModifier and TypeMethodDescriptionvoidFilterIterator.setPredicate(Predicate<? super E> predicate) Sets the predicate this the iterator to use where null accepts all values.voidFilterListIterator.setPredicate(Predicate<? super E> predicate) Sets the predicate this the iterator to use.Constructors in org.apache.commons.collections4.iterators with parameters of type PredicateModifierConstructorDescriptionFilterIterator(Iterator<? extends E> iterator, Predicate<? super E> predicate) Constructs a newFilterIteratorthat will use the given iterator and predicate.FilterListIterator(ListIterator<? extends E> iterator, Predicate<? super E> predicate) Constructs a newFilterListIterator.FilterListIterator(Predicate<? super E> predicate) Constructs a newFilterListIteratorthat will not function untilsetListIteratoris invoked. -
Uses of Predicate in org.apache.commons.collections4.list
Methods in org.apache.commons.collections4.list with parameters of type PredicateModifier and TypeMethodDescriptionstatic <T> PredicatedList<T> PredicatedList.predicatedList(List<T> list, Predicate<? super T> predicate) Factory method to create a predicated (validating) list.Constructors in org.apache.commons.collections4.list with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedList(List<E> list, Predicate<? super E> predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections4.map
Fields in org.apache.commons.collections4.map declared as PredicateModifier and TypeFieldDescriptionPredicatedMap.keyPredicateThe key predicate to usePredicatedMap.valuePredicateThe value predicate to useMethods in org.apache.commons.collections4.map with parameters of type PredicateModifier and TypeMethodDescriptionstatic <K,V> PredicatedMap <K, V> PredicatedMap.predicatedMap(Map<K, V> map, Predicate<? super K> keyPredicate, Predicate<? super V> valuePredicate) Factory method to create a predicated (validating) map.static <K,V> PredicatedSortedMap <K, V> PredicatedSortedMap.predicatedSortedMap(SortedMap<K, V> map, Predicate<? super K> keyPredicate, Predicate<? super V> valuePredicate) Factory method to create a predicated (validating) sorted map.Constructors in org.apache.commons.collections4.map with parameters of type Predicate -
Uses of Predicate in org.apache.commons.collections4.multiset
Methods in org.apache.commons.collections4.multiset with parameters of type PredicateModifier and TypeMethodDescriptionstatic <E> PredicatedMultiSet<E> PredicatedMultiSet.predicatedMultiSet(MultiSet<E> multiset, Predicate<? super E> predicate) Factory method to create a predicated (validating) multiset.Constructors in org.apache.commons.collections4.multiset with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedMultiSet(MultiSet<E> multiset, Predicate<? super E> predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections4.queue
Methods in org.apache.commons.collections4.queue with parameters of type PredicateModifier and TypeMethodDescriptionstatic <E> PredicatedQueue<E> PredicatedQueue.predicatedQueue(Queue<E> Queue, Predicate<? super E> predicate) Factory method to create a predicated (validating) queue.Constructors in org.apache.commons.collections4.queue with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedQueue(Queue<E> queue, Predicate<? super E> predicate) Constructor that wraps (not copies). -
Uses of Predicate in org.apache.commons.collections4.set
Methods in org.apache.commons.collections4.set with parameters of type PredicateModifier and TypeMethodDescriptionstatic <E> PredicatedNavigableSet<E> PredicatedNavigableSet.predicatedNavigableSet(NavigableSet<E> set, Predicate<? super E> predicate) Factory method to create a predicated (validating) navigable set.static <E> PredicatedSet<E> PredicatedSet.predicatedSet(Set<E> set, Predicate<? super E> predicate) Factory method to create a predicated (validating) set.static <E> PredicatedSortedSet<E> PredicatedSortedSet.predicatedSortedSet(SortedSet<E> set, Predicate<? super E> predicate) Factory method to create a predicated (validating) sorted set.Constructors in org.apache.commons.collections4.set with parameters of type PredicateModifierConstructorDescriptionprotectedPredicatedNavigableSet(NavigableSet<E> set, Predicate<? super E> predicate) Constructor that wraps (not copies).protectedPredicatedSet(Set<E> set, Predicate<? super E> predicate) Constructor that wraps (not copies).protectedPredicatedSortedSet(SortedSet<E> set, Predicate<? super E> predicate) Constructor that wraps (not copies).
IterableUtils.countMatches(Iterable, Predicate)instead