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