public interface LongIterator
LongCollection
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Tests whether there are elements remaining in the collection.
|
long |
next()
Obtain the next element in the collection.
|
void |
remove()
Remove from the underlying collection the last element returned by next
(optional operation).
|
boolean hasNext()
next()
will not throw an exception.long next()
NoSuchElementException
- if there are no more elementsvoid remove()
next()
. It does not affect what will be returned by
subsequent calls to next.java.lang.IllegalStateException
- if next has not yet been called or remove has already been called
since the last call to next.java.lang.UnsupportedOperationException
- if this Iterator does not support the remove operation.