java.lang.Object
io.sf.carte.util.SingleElementIterator<E>
- Type Parameters:
E
- the element type.
- All Implemented Interfaces:
Iterator<E>
Iterates an immutable collection composed by a single element.
-
Constructor Summary
ConstructorDescriptionSingleElementIterator
(E element) Construct a new iterator with the given element. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
SingleElementIterator
Construct a new iterator with the given element.- Parameters:
element
- the element.- Throws:
NullPointerException
- if the element isnull
.
-
-
Method Details