org.apache.kafka.common.utils
Class AbstractIterator<T>

java.lang.Object
  extended by org.apache.kafka.common.utils.AbstractIterator<T>
Type Parameters:
T - The type of thing we are iterating over
All Implemented Interfaces:
java.util.Iterator<T>
Direct Known Subclasses:
MemoryRecords.RecordsIterator

public abstract class AbstractIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>

A base class that simplifies implementing an iterator


Constructor Summary
AbstractIterator()
           
 
Method Summary
protected  T allDone()
           
 boolean hasNext()
           
protected abstract  T makeNext()
           
 T next()
           
 T peek()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractIterator

public AbstractIterator()
Method Detail

hasNext

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

next

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

remove

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

peek

public T peek()

allDone

protected T allDone()

makeNext

protected abstract T makeNext()