Interface PeekableIterator<T>
- Type Parameters:
T- The type of this iterator.
- All Superinterfaces:
Iterator<T>
- All Known Implementing Classes:
AbstractPeekableIterator, AddressIteratorAdapter.BackwardAddressIterator, AddressIteratorAdapter.ForwardAddressIterator, CachedAddressSetView.CachedRangeIterator, DBTraceProgramViewSymbolTable.PrimarySymbolIterator, DistinctIterator, MergeSortingIterator, MergeSortingIterator.LabeledIterator, OverlappingObjectIterator, TraceViewportSpanIterator, TwoWayBreakdownAddressRangeIterator, UnionAddressRangeIterator, WrappingPeekableIterator
An iterator that allows you to peek at the next item on the iterator.
-
Method Summary
Modifier and TypeMethodDescriptionpeek()Returns the item that would be returned by callingIterator.next(), but without incrementing the iterator.Methods inherited from interface Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
peek
Returns the item that would be returned by callingIterator.next(), but without incrementing the iterator.- Returns:
- the item that would be returned by calling
Iterator.next() - Throws:
NoSuchElementException- if there is no element to peek at
-