Class AbstractIterator<T>
- java.lang.Object
- 
- org.eclipse.net4j.util.collection.AbstractIterator<T>
 
- 
- All Implemented Interfaces:
- java.util.Iterator<T>
 - Direct Known Subclasses:
- AbstractCloseableIterator,- AbstractFilteredIterator,- AbstractListIterator,- ComposedIterator
 
 public abstract class AbstractIterator<T> extends java.lang.Object implements java.util.Iterator<T>An abstract base class for custom iterators that only requires to implement a singlecomputeNextElement()method.- Since:
- 3.2
- Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.lang.ObjectEND_OF_DATAThe token to be used incomputeNextElement()to indicate the end of the iteration.
 - 
Constructor SummaryConstructors Constructor Description AbstractIterator()
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.ObjectcomputeNextElement()Returns the next iteration element, orEND_OF_DATAif the end of the iteration has been reached.static <T> java.util.ListIterator<T>empty()booleanhasNext()Tnext()voidremove()
 
- 
- 
- 
Field Detail- 
END_OF_DATAprotected static final java.lang.Object END_OF_DATA The token to be used incomputeNextElement()to indicate the end of the iteration.
 
- 
 - 
Method Detail- 
hasNextpublic final boolean hasNext() - Specified by:
- hasNextin interface- java.util.Iterator<T>
 
 - 
removepublic void remove() - Specified by:
- removein interface- java.util.Iterator<T>
 
 - 
computeNextElementprotected abstract java.lang.Object computeNextElement() Returns the next iteration element, orEND_OF_DATAif the end of the iteration has been reached.
 - 
emptypublic static <T> java.util.ListIterator<T> empty() - Since:
- 3.4
 
 
- 
 
-