public abstract static class LongBigListIterators.AbstractIndexBasedBigListIterator extends LongBigListIterators.AbstractIndexBasedBigIterator implements it.unimi.dsi.fastutil.longs.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).
lastReturned, minPos, pos| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIndexBasedBigListIterator(long minPos,
long initialPos) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(long k) |
protected abstract void |
add(long location,
long k)
Add the given item at the given index.
|
long |
back(long n) |
boolean |
hasPrevious() |
long |
nextIndex() |
long |
previousIndex() |
long |
previousLong() |
void |
set(long k) |
protected abstract void |
set(long location,
long k)
Sets the given item at the given index.
|
forEachRemaining, get, getMaxPos, hasNext, nextLong, remove, remove, skip, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadd, set, skip, skipback, previousprotected AbstractIndexBasedBigListIterator(long minPos,
long initialPos)
protected abstract void add(long location,
long k)
This method should also do what is needed to track the change to the LongBigListIterators.AbstractIndexBasedBigIterator.getMaxPos().
Usually this is accomplished by having this method call the parent Collection's appropriate add
method, and having LongBigListIterators.AbstractIndexBasedBigIterator.getMaxPos() track the parent collection's size.
Do not modify LongBigListIterators.AbstractIndexBasedBigIterator.pos in this method; the default #add() method takes care of this.
See LongBigListIterators.AbstractIndexBasedBigIterator.pos and #get(int) for discussion on what the location means.
protected abstract void set(long location,
long k)
See LongBigListIterators.AbstractIndexBasedBigIterator.pos and #get(int) for discussion on what the location means.
public boolean hasPrevious()
hasPrevious in interface it.unimi.dsi.fastutil.BidirectionalIterator<java.lang.Long>public long previousLong()
previousLong in interface it.unimi.dsi.fastutil.longs.LongBidirectionalIteratorpublic long nextIndex()
nextIndex in interface it.unimi.dsi.fastutil.BigListIterator<java.lang.Long>public long previousIndex()
previousIndex in interface it.unimi.dsi.fastutil.BigListIterator<java.lang.Long>public void add(long k)
add in interface it.unimi.dsi.fastutil.longs.LongBigListIteratorpublic void set(long k)
set in interface it.unimi.dsi.fastutil.longs.LongBigListIteratorpublic long back(long n)
back in interface it.unimi.dsi.fastutil.longs.LongBigListIterator