T - element type of iteratorpublic class SingletonIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
| Constructor and Description |
|---|
SingletonIterator(T element)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
T |
next() |
public SingletonIterator(T element)
element - single element in this iterator