|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.aliasi.util.Iterators.Singleton<E>
public static class Iterators.Singleton<E>
An Iterator.Singleton is an iterator over a
singleton object.
| Constructor Summary | |
|---|---|
Iterators.Singleton(E member)
Construct a singleton iterator that returns the specified object. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
Returns true if the single member has not
already been returned. |
E |
next()
Returns the singleton member if it has not yet been returned, otherwise throw an exception. |
void |
remove()
Throws an unsupported operation exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Iterators.Singleton(E member)
member - Single member over which to iterate.| Method Detail |
|---|
public boolean hasNext()
true if the single member has not
already been returned.
hasNext in interface Iterator<E>true if the single member has not
already been returned.public E next()
next in interface Iterator<E>NoSuchElementException - If the singleton member has
already been returned and no elements remain.public void remove()
remove in interface Iterator<E>UnsupportedOperationException - Whenver called.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||