de.intarsys.tools.collection
Class EmptyIterator
java.lang.Object
de.intarsys.tools.collection.EmptyIterator
- All Implemented Interfaces:
- Iterator
public class EmptyIterator
- extends Object
- implements Iterator
An Iterator over an empty collection.
Method Summary |
boolean |
hasNext()
Return always false as an emtpy iterator has no elements. |
Object |
next()
Throw always exception, as an empty enumeration has no elements. |
void |
remove()
|
UNIQUE
public static final Iterator UNIQUE
hasNext
public boolean hasNext()
- Return always false as an emtpy iterator has no elements.
- Specified by:
hasNext
in interface Iterator
- Returns:
- Return always false as an emtpy iterator has no elements.
next
public Object next()
- Throw always exception, as an empty enumeration has no elements.
- Specified by:
next
in interface Iterator
- Returns:
- never
- Throws:
NoSuchElementException
- Is thrown always
remove
public void remove()
- Specified by:
remove
in interface Iterator
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.