Class ObjectBigListIterators.AbstractIndexBasedBigListIterator<K>
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<K>,it.unimi.dsi.fastutil.BigListIterator<K>,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<K>,it.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>,it.unimi.dsi.fastutil.objects.ObjectIterator<K>,Iterator<K>
- Enclosing class:
ObjectBigListIterators
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).
-
Field Summary
Fields inherited from class it.unimi.dsi.fastutil.objects.ObjectBigListIterators.AbstractIndexBasedBigIterator
lastReturned, minPos, pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractIndexBasedBigListIterator(long minPos, long initialPos) -
Method Summary
Methods inherited from class it.unimi.dsi.fastutil.objects.ObjectBigListIterators.AbstractIndexBasedBigIterator
forEachRemaining, get, getMaxPos, hasNext, next, remove, remove, skip, skipMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, removeMethods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator
backMethods inherited from interface it.unimi.dsi.fastutil.objects.ObjectBigListIterator
skip, skip
-
Constructor Details
-
AbstractIndexBasedBigListIterator
protected AbstractIndexBasedBigListIterator(long minPos, long initialPos)
-
-
Method Details
-
add
Add the given item at the given index.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's appropriate add method, and havinginvalid reference
CollectionObjectBigListIterators.AbstractIndexBasedBigIterator.getMaxPos()track the parent.invalid reference
collection's size
Do not modify
ObjectBigListIterators.AbstractIndexBasedBigIterator.posin this method; the default#add()method takes care of this.See
ObjectBigListIterators.AbstractIndexBasedBigIterator.posandObjectBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
set
Sets the given item at the given index.See
ObjectBigListIterators.AbstractIndexBasedBigIterator.posandObjectBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<K>
-
previous
- Specified by:
previousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<K>
-
nextIndex
public long nextIndex()- Specified by:
nextIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<K>
-
previousIndex
public long previousIndex()- Specified by:
previousIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<K>
-
add
-
set
-
back
public long back(long n) - Specified by:
backin interfaceit.unimi.dsi.fastutil.objects.ObjectBigListIterator<K>
-