T - public abstract class NextOnlyIterator<T>
extends java.lang.Object
implements java.util.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.
|
public boolean hasNext()
hasNext in interface java.util.Iterator<T>protected abstract void generateNext()
protected void nextElement(T el)
el - protected void noMoreElements()
Copyright © 2014. All Rights Reserved.