public interface LongIterator extends Iterator<Long>, PrimitiveIterator.OfLong
Iterator<Long>.
See the comparison of iteration ways in the library.
Iterators of updatable and immutable collections don't support Iterator.remove()
operation. More about mutability profiles.
LongCollection.iterator()PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong| Modifier and Type | Method and Description |
|---|---|
void |
forEachRemaining(Consumer<? super Long> action)
Deprecated.
Use specialization
forEachRemaining(LongConsumer) instead |
void |
forEachRemaining(LongConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
long |
nextLong()
Returns the next
long element in the iteration. |
nextlong nextLong()
long element in the iteration. This is a primitive specialization
of the Iterator.next() method.nextLong in interface PrimitiveIterator.OfLonglong element in the iterationNoSuchElementException - if the iteration has no more elements@Deprecated void forEachRemaining(@Nonnull Consumer<? super Long> action)
forEachRemaining(LongConsumer) insteadforEachRemaining in interface Iterator<Long>forEachRemaining in interface PrimitiveIterator.OfLongaction - the action to be performed for each elementvoid forEachRemaining(@Nonnull LongConsumer action)
forEachRemaining in interface PrimitiveIterator<Long,LongConsumer>forEachRemaining in interface PrimitiveIterator.OfLongaction - the action to be performed for each element