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, remove
public static final Iterator NullIterator
public ObjectIterator(Object which)
public ObjectIterator()
public ObjectIterator setFor(Object which)
which
- the Object to iterate.public boolean hasNext()
IteratorEnumerator
hasNext
in interface Iterator
hasNext
in class IteratorEnumerator
public Object next()
IteratorEnumerator
next
in interface Iterator
next
in class IteratorEnumerator
public static ObjectIterator getCached(Object forWho)
public ObjectIterator cache()