public abstract static class DoubleBigListIterators.AbstractIndexBasedBigListIterator extends DoubleBigListIterators.AbstractIndexBasedBigIterator implements it.unimi.dsi.fastutil.doubles.DoubleBigListIterator
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(double k) |
protected abstract void |
add(long location,
double k)
Add the given item at the given index.
|
long |
back(long n) |
boolean |
hasPrevious() |
long |
nextIndex() |
double |
previousDouble() |
long |
previousIndex() |
void |
set(double k) |
protected abstract void |
set(long location,
double k)
Sets the given item at the given index.
|
forEachRemaining, get, getMaxPos, hasNext, nextDouble, 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,
double k)
This method should also do what is needed to track the change to the DoubleBigListIterators.AbstractIndexBasedBigIterator.getMaxPos().
Usually this is accomplished by having this method call the parent Collection's appropriate add
method, and having DoubleBigListIterators.AbstractIndexBasedBigIterator.getMaxPos() track the parent collection's size.
Do not modify DoubleBigListIterators.AbstractIndexBasedBigIterator.pos in this method; the default #add() method takes care of this.
See DoubleBigListIterators.AbstractIndexBasedBigIterator.pos and #get(int) for discussion on what the location means.
protected abstract void set(long location,
double k)
See DoubleBigListIterators.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.Double>public double previousDouble()
previousDouble in interface it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIteratorpublic long nextIndex()
nextIndex in interface it.unimi.dsi.fastutil.BigListIterator<java.lang.Double>public long previousIndex()
previousIndex in interface it.unimi.dsi.fastutil.BigListIterator<java.lang.Double>public void add(double k)
add in interface it.unimi.dsi.fastutil.doubles.DoubleBigListIteratorpublic void set(double k)
set in interface it.unimi.dsi.fastutil.doubles.DoubleBigListIteratorpublic long back(long n)
back in interface it.unimi.dsi.fastutil.doubles.DoubleBigListIterator