Class AbstractIterator<T>
- java.lang.Object
-
- org.openjdk.jmc.common.collection.AbstractIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
abstract class AbstractIterator<T> extends java.lang.Object implements java.util.Iterator<T>A partial implementation of Iterator. The only method remaining to implement by a subclass isfindNext().Not intended for public use.
-
-
Field Summary
Fields Modifier and Type Field Description private Tnextprotected TNO_MORE_ELEMENTSA marker object that can be returned byfindNext()to mark the end of the iterator.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TfindNext()booleanhasNext()Tnext()voidremove()
-
-
-
Field Detail
-
NO_MORE_ELEMENTS
protected final T NO_MORE_ELEMENTS
A marker object that can be returned byfindNext()to mark the end of the iterator.
-
next
private T next
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<T>
-
remove
public final void remove()
- Specified by:
removein interfacejava.util.Iterator<T>
-
findNext
protected abstract T findNext()
- Returns:
- the next element to return by the iterator, or
NO_MORE_ELEMENTSif there are no more elements
-
-