PrimitiveIterator.OfLong
public
static
interface
PrimitiveIterator.OfLong
implements
PrimitiveIterator<Long, LongConsumer>
java.util.PrimitiveIterator.OfLong
|
An Iterator specialized for long
values.
Summary
Inherited methods |
From interface
java.util.PrimitiveIterator
abstract
void
|
forEachRemaining(LongConsumer action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
|
From interface
java.util.Iterator
default
void
|
forEachRemaining(Consumer<? super E> action)
Performs the given action for each remaining element until all elements
have been processed or the action throws an exception.
|
abstract
boolean
|
hasNext()
Returns true if the iteration has more elements.
|
abstract
Long
|
next()
Returns the next element in the iteration.
|
default
void
|
remove()
Removes from the underlying collection the last element returned
by this iterator (optional operation).
|
|
Public methods
forEachRemaining
public void forEachRemaining (LongConsumer action)
Implementation Requirements:
Parameters |
action |
LongConsumer |
forEachRemaining
public void forEachRemaining (Consumer<? super Long> action)
Implementation Requirements:
Parameters |
action |
Consumer |
next
public Long next ()
Returns the next element in the iteration.
Implementation Requirements:
- The default implementation boxes the result of calling
nextLong()
, and returns that boxed result.
Returns |
Long |
the next element in the iteration |
nextLong
public abstract long nextLong ()
Returns the next long
element in the iteration.
Returns |
long |
the next long element in the iteration |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[]]