public final class LongPrimitiveArrayIterator extends Object implements LongPrimitiveIterator
Constructor and Description |
---|
LongPrimitiveArrayIterator(long[] array)
Creates an
LongPrimitiveArrayIterator over an entire array. |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
Long |
next() |
long |
nextLong() |
long |
peek() |
void |
remove() |
void |
skip(int n)
Skip the next n elements supplied by this
Iterator . |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
forEachRemaining
public LongPrimitiveArrayIterator(long[] array)
Creates an LongPrimitiveArrayIterator
over an entire array.
array
- array to iterate overpublic long nextLong()
nextLong
in interface LongPrimitiveIterator
long
in iterationpublic long peek()
peek
in interface LongPrimitiveIterator
long
in iteration without advancing iterationpublic void remove()
remove
in interface Iterator<Long>
UnsupportedOperationException
public void skip(int n)
SkippingIterator
Iterator
. If there are less than n elements remaining,
this skips all remaining elements in the Iterator
. This method has the same effect as calling
Iterator.next()
n times, except that it will never throw NoSuchElementException
.skip
in interface SkippingIterator<Long>
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.