Class ProducerIterator<T>

java.lang.Object
org.codehaus.commons.compiler.util.iterator.ProducerIterator<T>
Type Parameters:
T - The type of the products and the iterator elements
All Implemented Interfaces:
Iterator<T>
Direct Known Subclasses:
DirectoryIterator

public class ProducerIterator<T> extends Object implements Iterator<T>
An Iterator that iterates over all the objects produced by a delegate Producer.
See Also:
  • Field Details

  • Constructor Details

    • ProducerIterator

      public ProducerIterator(Producer<T> producer)
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<T>