Package de.intarsys.tools.collection
Class EmptyIterator
java.lang.Object
de.intarsys.tools.collection.EmptyIterator
- All Implemented Interfaces:
Iterator
An Iterator over an empty collection.
-
Field Details
-
UNIQUE
-
-
Constructor Details
-
EmptyIterator
protected EmptyIterator()Create an EmptyIterator.
-
-
Method Details
-
hasNext
public boolean hasNext()Return always false as an emtpy iterator has no elements. -
next
Throw always exception, as an empty enumeration has no elements.- Specified by:
next
in interfaceIterator
- Returns:
- never
- Throws:
NoSuchElementException
- Is thrown always
-
remove
public void remove()
-