org.imemex.operators.impl
Class AdaptedIterator<E>

java.lang.Object
  extended by org.imemex.operators.impl.AdaptedIterator<E>
All Implemented Interfaces:
java.util.Iterator<E>

public class AdaptedIterator<E>
extends java.lang.Object
implements java.util.Iterator<E>

Adapts a PullOperator to an Iterator by correctly handling the calls to open and close in the pull operator.

Author:
marcos

Constructor Summary
AdaptedIterator(PullOperator<E> operator)
          Instantiates a new AdaptedIterator.
 
Method Summary
 boolean hasNext()
           
 E next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaptedIterator

public AdaptedIterator(PullOperator<E> operator)
Instantiates a new AdaptedIterator.

Method Detail

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>