public class ObjectIterator extends IteratorEnumerator
| Modifier and Type | Field and Description |
|---|---|
static Iterator |
NullIterator |
| Constructor and Description |
|---|
ObjectIterator() |
ObjectIterator(Object which)
Create an ObjectIterator which iterates the provided Object only.
|
| Modifier and Type | Method and Description |
|---|---|
ObjectIterator |
cache()
Put this Object in the Cache and return null.
|
static ObjectIterator |
getCached(Object forWho) |
boolean |
hasNext()
Override this to implement your own hasNext().
|
Object |
next()
Override this to implement your own next().
|
ObjectIterator |
setFor(Object which)
Reset the Iterator to iterate for the specfied Object.
|
hasMoreElements, nextElement, removepublic static final Iterator NullIterator
public ObjectIterator(Object which)
public ObjectIterator()
public ObjectIterator setFor(Object which)
which - the Object to iterate.public boolean hasNext()
IteratorEnumeratorhasNext in interface IteratorhasNext in class IteratorEnumeratorpublic Object next()
IteratorEnumeratornext in interface Iteratornext in class IteratorEnumeratorpublic static ObjectIterator getCached(Object forWho)
public ObjectIterator cache()