Interface Producer<T>
-
- Type Parameters:
T
- The type of the products
public interface Producer<T>
An object that produces someObject
each time theproduce()
method is invoked. This behavior is similar to theIterator
, but is represented by one singleproduce()
method as opposed toIterator
's two methodsIterator.hasNext()
andIterator.next()
. This simplifies the implementation of certain complex iterations.- See Also:
DirectoryIterator
,ProducerIterator
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
produce()
Produces the next object.
-