de.unkrig.commons.lang.protocol
Interface Consumer<T>

Type Parameters:
T -

public interface Consumer<T>

An entity that comsumes a series of objects.


Method Summary
 void consume(T subject)
          Consumes one subject of type T.
 

Method Detail

consume

void consume(T subject)
Consumes one subject of type T.

Generally subjects should either be immutable, or the 'ownership' of the product should pass from the caller to the consumer. Particularly, the consumer should not be called with one (mutable) instance more than once.