com.twitter.common.base
Interface ExceptionalClosure<T,E extends Exception>

Type Parameters:
T - The closure type.
E - The exception type thrown by the closure.
All Known Subinterfaces:
Closure<T>

public interface ExceptionalClosure<T,E extends Exception>

An interface that captures a unit of work against an item.


Method Summary
 void execute(T item)
          Performs a unit of work on item, possibly throwing E in the process.
 

Method Detail

execute

void execute(T item)
             throws E extends Exception
Performs a unit of work on item, possibly throwing E in the process.

TODO(John Sirois): consider supporting @Nullable

Parameters:
item - the item to perform work against
Throws:
E - if there was a problem performing the work
E extends Exception