|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.util.leap.EmptyIterator
public class EmptyIterator
Singleton Iterator for an empty collection. The usage of the singleton-pattern for this simple object allows just to save some memory.
| Method Summary | |
|---|---|
static Iterator |
getInstance()
Returns the singleton EmptyIterator object. |
boolean |
hasNext()
Checks whether the iterator can scan further. |
java.lang.Object |
next()
Retrieves the next element in the collection scanned by this iterator. |
void |
remove()
Remove the element pointed to by this iterator from the collection. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Iterator getInstance()
public boolean hasNext()
hasNext in interface java.util.Iteratorfalse.public java.lang.Object next()
next in interface java.util.Iteratorjava.util.NoSuchElementException - Always, because the underlying
collection is always empty.public void remove()
remove in interface java.util.Iteratorjava.lang.RuntimeException - Always, because the underlying
collection is always empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||