T - is the element type of the iterator.StreamIterator<T>, Iterator<T>CompositeStreamIterator, ConvertingStreamIterator, FilteringStreamIterator, InputStreamIterator, StackedStreamIterator, StreamIteratorPipepublic abstract class AbstractStreamIterator<T> extends Object implements StreamIterator<T>
Iterator contract.
Because this is a stream iterator meant for complex streams,
null values are not supported.| Constructor | Description |
|---|---|
AbstractStreamIterator() |
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract T |
findNext() |
This method looks for the next entry to be returned.
|
boolean |
hasNext() |
|
T |
next() |
This method overwrites
Iterator.next() with a one change: The
resulting element is never null. |
T |
peek() |
This method returns the next element which will be returned by next(),
without moving forward.
|
forEachRemaining, removeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitempty, filter, flatMap, map, of, spliterator, streamprotected abstract T findNext()
null is returned.null is returned in case no more
entries are available.public final T next()
StreamIteratorIterator.next() with a one change: The
resulting element is never null.next in interface Iterator<T>next in interface StreamIterator<T>NoSuchElementException is thrown.
Iterator.hasNext() will returned false in this case and
should be asked for the presence of more elements in advance. The
result is never null.public final T peek()
StreamIteratorpeek in interface StreamIterator<T>NoSuchElementException is thrown.
Iterator.hasNext() will returned false in this case and
should be asked for the presence of more elements in advance. The
result is never null.Copyright © 2017–2018 PureSol Technologies. All rights reserved.