Top Description Methods
org.codehaus.commons.compiler.util

public Interface Producer<T>

Type Parameters
<T>
The type of the products
Imports
org.codehaus.commons.nullanalysis.Nullable

An object that produces some java.lang.Object each time the produce() method is invoked. This behavior is similar to the java.util.Iterator, but is represented by one single produce() method as opposed to java.util.Iterator's two methods java.util.Iterator#hasNext() and java.util.Iterator#next(). This simplifies the implementation of certain complex iterations.
See Also
org.codehaus.commons.compiler.util.iterator.DirectoryIterator, org.codehaus.commons.compiler.util.iterator.ProducerIterator

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the next object or null to indicate that no more objects can be produced
produce
()

Produces the next object.

Method Detail

produceback to summary
public T produce()

Produces the next object.

Returns:T

the next object or null to indicate that no more objects can be produced

Annotations
@Nullable