Top Description Methods
org.apache.commons.collections4

public Interface Closure<T>

Known Direct Implementers
org.apache.commons.collections4.functors.CatchAndRethrowClosure, org.apache.commons.collections4.functors.ChainedClosure, org.apache.commons.collections4.functors.ExceptionClosure, org.apache.commons.collections4.functors.ForClosure, org.apache.commons.collections4.functors.IfClosure, org.apache.commons.collections4.functors.NOPClosure, org.apache.commons.collections4.functors.SwitchClosure, org.apache.commons.collections4.functors.TransformerClosure, org.apache.commons.collections4.functors.WhileClosure
Annotations
@FunctionalInterface
Type Parameters
<T>
the type that the closure acts on

Defines a functor interface implemented by classes that do something.

A Closure represents a block of code which is executed from inside some block, function or iteration. It operates an input object.

Standard implementations of common closures are provided by ClosureUtils. These include method invocation and for/while loops.

Since
1.0

Method Summary

Modifier and TypeMethod and Description
public void
execute(T
the input to execute on
input
)

Performs an action on the specified input object.

Method Detail

executeback to summary
public void execute(T input)

Performs an action on the specified input object.

Parameters
input:T

the input to execute on

Exceptions
ClassCastException:
(runtime) if the input is the wrong class
IllegalArgumentException:
(runtime) if the input is invalid
FunctorException:
(runtime) if any other error occurs