java.lang.Object
io.github.mmm.base.collection.SingleElementIterator<E>
- Type Parameters:
E- type of the element to iterate.
- All Implemented Interfaces:
Enumeration<E>,Iterator<E>
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Enumeration
asIteratorMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
SingleElementIterator
The constructor.- Parameters:
element- the single element to iterate. Ifnullthe iterator will be empty.
-
-
Method Details
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElementsin interfaceEnumeration<E>
-
hasNext
public boolean hasNext() -
nextElement
- Specified by:
nextElementin interfaceEnumeration<E>
-
next
-