Package org.codehaus.commons.compiler.util

# Interface Producer<T>

Type Parameters:
  `T` - The type of the products

public interface Producer<T>
An object that produces some `Object` each time the `produce()` method is invoked. This behavior is similar to the `Iterator`, but is represented by one single `produce()` method as opposed to `Iterator`'s two methods `Iterator.hasNext()` and `Iterator.next()`. This simplifies the implementation of certain complex iterations.

See Also:
  - `DirectoryIterator`
  - `ProducerIterator`

## Method Summary

Modifier and Type
Method
Description
`T`
`produce()`
Produces the next object.

## Method Details

### produce

@Nullable T produce()
Produces the next object.

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