public class SingleObjectIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>
Constructor and Description |
---|
SingleObjectIterator()
Ctor for an iterator starting out empty.
|
SingleObjectIterator(T object)
Constructor, takes the single object to iterate over as a parameter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
void |
remove() |
public SingleObjectIterator(T object)
object
- single object that the iterator returns, or null for an empty iteratorpublic SingleObjectIterator()