net.sf.mmm.util.collection.base
Class SingleElementIterator<E>
java.lang.Object
net.sf.mmm.util.collection.base.SingleElementIterator<E>
- Type Parameters:
E - is the templated type of the elements to iterate.
- All Implemented Interfaces:
- Iterator<E>
public class SingleElementIterator<E>
- extends Object
- implements Iterator<E>
This is an implementation of the Iterator interface that
iterates a single element.
- Since:
- 1.0.2
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
|
Field Summary |
private E |
element
The single element to iterate. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
element
private E element
- The single element to iterate.
SingleElementIterator
public SingleElementIterator(E element)
- The constructor.
- Parameters:
element - is the single element to iterate. If null the
iterator will be entirely empty.
hasNext
public boolean hasNext()
-
- Specified by:
hasNext in interface Iterator<E>
next
public E next()
-
- Specified by:
next in interface Iterator<E>
remove
public void remove()
-
- Specified by:
remove in interface Iterator<E>
Copyright © 2001-2010 mmm-Team. All Rights Reserved.