Package org.apache.commons.collections4.functors


package org.apache.commons.collections4.functors
Implements the Closure, Predicate, Transformer and Factory interfaces. These provide simple callbacks for processing with collections.

WARNING: from v4.1 onwards several unsafe classes in this package will not be serializable anymore in order to prevent potential remote code execution exploits.

Classes considered to be unsafe are:

  • CloneTransformer
  • ForClosure
  • InstantiateFactory
  • InstantiateTransformer
  • InvokerTransformer
  • PrototypeFactory$PrototypeCloneFactory
  • PrototypeFactory$PrototypeSerializationFactory
  • WhileClosure
  • Class
    Description
    Abstract base class for quantification predicates, e.g.
    Predicate implementation that returns true if all the predicates return true.
    Predicate implementation that returns true if both the predicates return true.
    Predicate implementation that returns true if any of the predicates return true.
    Closure that catches any checked exception and re-throws it as a FunctorException runtime exception.
    Closure implementation that chains the specified closures together.
    Transformer implementation that chains the specified transformers together.
    Transformer implementation that returns a clone of the input object.
    Transformer implementation that calls a Closure using the input object and then returns the input.
    Predicate that compares the input object with the one stored in the predicate using a comparator.
     
    Factory implementation that returns the same constant each time.
    Transformer implementation that returns the same constant each time.
    Default Equator implementation.
    Predicate implementation that returns true if the input is the same object as the one stored in this predicate by equals.
    Closure implementation that always throws an exception.
    Factory implementation that always throws an exception.
    Predicate implementation that always throws an exception.
    Transformer implementation that always throws an exception.
    Transformer implementation that calls a Factory and returns the result.
    Predicate implementation that always returns false.
    Closure implementation that calls another closure n times, like a for loop.
    Predicate implementation that returns true if the input is the same object as the one stored in this predicate.
    Closure implementation acts as an if statement calling one or other closure based on a predicate.
    Transformer implementation that will call one of two closures based on whether a predicate evaluates as true or false.
    Predicate implementation that returns true if the input is an instanceof the type stored in this predicate.
    Factory implementation that creates a new object instance by reflection.
    Transformer implementation that creates a new object instance by reflection.
    Transformer implementation that creates a new object instance by reflection.
    Transformer implementation that returns the value held in a specified map using the input parameter as a key.
    Predicate implementation that returns true if none of the predicates return true.
    Closure implementation that does nothing.
    Transformer implementation that does nothing.
    Predicate implementation that returns true if the input is not null.
    Predicate implementation that returns the opposite of the decorated predicate.
    Predicate implementation that throws an exception if the input is null.
    Predicate implementation that returns false if the input is null.
    Predicate implementation that returns true if the input is null.
    Predicate implementation that returns true if the input is null.
    Predicate implementation that returns true if only one of the predicates return true.
    Predicate implementation that returns true if either of the predicates return true.
    Defines a predicate that decorates one or more other predicates.
    Transformer implementation that calls a Predicate using the input object and then returns the result.
    Factory implementation that creates a new instance each time based on a prototype.
    Transformer implementation that returns the result of calling String.valueOf on the input object.
    Closure implementation calls the closure whose predicate returns true, like a switch statement.
    Transformer implementation calls the transformer whose predicate returns true, like a switch statement.
    Predicate implementation that transforms the given object before invoking another Predicate.
    Closure implementation that calls a Transformer using the input object and ignore the result.
    Predicate implementation that returns the result of a transformer.
    Predicate implementation that always returns true.
    Predicate implementation that returns true the first time an object is passed into the predicate.
    Closure implementation that executes a closure repeatedly until a condition is met, like a do-while or while loop.