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