org.rightcollections
Interface Closurable<E>

Type Parameters:
E - type of closurable elements.
All Known Subinterfaces:
RightCollection<E>, RightList<E>, RightSet<E>
All Known Implementing Classes:
AbstractRightCollection, RightCollectionImpl, RightListImpl, RightSetImpl

public interface Closurable<E>

Show that we can execute some closure on each element of collection that implements this interface.

Author:
Ruslan Pilin

Method Summary
<T extends Closure<E>>
T
execute(T closure)
          Executes closure on each element of collection.
 

Method Detail

execute

<T extends Closure<E>> T execute(T closure)
Executes closure on each element of collection.

Type Parameters:
T - type of closure to execute on each element of collection.
Parameters:
closure - closure to execute on each element of collection.
Returns:
closure passed by parameter to extract the result from it.


Copyright © 2009 Ruslan Pilin. All Rights Reserved.