T - public abstract class NextOnlyIterator<T> extends Object implements Iterator<T>
| Constructor and Description |
|---|
NextOnlyIterator() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
generateNext()
This method will be called by the iterator whenever it needs
to find the next element to be iterated over.
|
boolean |
hasNext() |
T |
next() |
protected void |
nextElement(T el)
Call this from generateNext() with the next element to
be returned from the iterator.
|
protected void |
noMoreElements()
Call this from generateNext() if there are no more elements
to be iterated over.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removeprotected abstract void generateNext()
protected void nextElement(T el)
el - protected void noMoreElements()
Copyright © 2015. All Rights Reserved.