public abstract static class LongBigListIterators.AbstractIndexBasedBigListIterator extends LongBigListIterators.AbstractIndexBasedBigIterator implements LongBigListIterator
As the abstract methods in this class are used in inner loops, it is generally a
good idea to override the class as final
as to encourage the JVM to inline
them (or alternatively, override the abstract methods as final).
Modifier and Type | Method and Description |
---|---|
void |
add(long k)
Inserts the specified element into the list (optional operation).
|
long |
back(long n)
Moves back for the given number of elements.
|
boolean |
hasPrevious()
Returns whether there is a previous element.
|
long |
nextIndex()
Returns the index of the element that would be returned by a subsequent call to next.
|
long |
previousIndex()
Returns the index of the element that would be returned by a subsequent call to previous.
|
long |
previousLong()
Returns the previous element as a primitive type.
|
void |
set(long k)
Replaces the last element returned by
next() or
previous() with the specified element (optional operation). |
forEachRemaining, hasNext, nextLong, remove, skip, skip
forEachRemaining
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, set, skip, skip
back, previous
forEachRemaining, forEachRemaining, next, nextLong
public boolean hasPrevious()
BidirectionalIterator
hasPrevious
in interface BidirectionalIterator<java.lang.Long>
ListIterator.hasPrevious()
public long previousLong()
LongBidirectionalIterator
previousLong
in interface LongBidirectionalIterator
ListIterator.previous()
public long nextIndex()
BigListIterator
nextIndex
in interface BigListIterator<java.lang.Long>
ListIterator.nextIndex()
public long previousIndex()
BigListIterator
previousIndex
in interface BigListIterator<java.lang.Long>
ListIterator.previousIndex()
public void add(long k)
LongBigListIterator
add
in interface LongBigListIterator
ListIterator.add(Object)
public void set(long k)
LongBigListIterator
next()
or
previous()
with the specified element (optional operation).set
in interface LongBigListIterator
ListIterator.set(Object)
public long back(long n)
LongBigListIterator
The effect of this call is exactly the same as that of
calling previous()
for n
times (possibly stopping
if BidirectionalIterator.hasPrevious()
becomes false).
back
in interface LongBigListIterator
n
- the number of elements to skip back.BidirectionalIterator.previous()