E - The generic type of the iterator.public final class SingleElementIterator<E> extends Object implements Iterator<E>, Iterable<E>
Iterator that contains only a single element. The element can be reset such that the
iterator can be used multiple times. Initially, the iterator is empty until an element is set via
set(Object).| 构造器和说明 |
|---|
SingleElementIterator() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
hasNext() |
Iterator<E> |
iterator() |
E |
next() |
void |
remove() |
void |
set(E current)
Resets the element.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorpublic void set(E current)
current - The element to make available to the iterator.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.