Class LongBigListIterators.AbstractIndexBasedBigListIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Long>,it.unimi.dsi.fastutil.BigListIterator<Long>,it.unimi.dsi.fastutil.longs.LongBidirectionalIterator,it.unimi.dsi.fastutil.longs.LongBigListIterator,it.unimi.dsi.fastutil.longs.LongIterator,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Long>,it.unimi.dsi.fastutil.objects.ObjectIterator<Long>,Iterator<Long>,PrimitiveIterator<Long,,LongConsumer> PrimitiveIterator.OfLong
- Enclosing class:
LongBigListIterators
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).
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.PrimitiveIterator
PrimitiveIterator.OfDouble, PrimitiveIterator.OfInt, PrimitiveIterator.OfLong -
Field Summary
Fields inherited from class it.unimi.dsi.fastutil.longs.LongBigListIterators.AbstractIndexBasedBigIterator
lastReturned, minPos, pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractIndexBasedBigListIterator(long minPos, long initialPos) -
Method Summary
Methods inherited from class it.unimi.dsi.fastutil.longs.LongBigListIterators.AbstractIndexBasedBigIterator
forEachRemaining, get, getMaxPos, hasNext, nextLong, remove, remove, skip, skipMethods inherited from class it.unimi.dsi.fastutil.longs.AbstractLongIterator
forEachRemainingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBidirectionalIterator
back, previousMethods inherited from interface it.unimi.dsi.fastutil.longs.LongBigListIterator
add, set, skip, skipMethods inherited from interface it.unimi.dsi.fastutil.longs.LongIterator
forEachRemaining, forEachRemaining, next, nextLongMethods inherited from interface java.util.PrimitiveIterator.OfLong
forEachRemaining
-
Constructor Details
-
AbstractIndexBasedBigListIterator
protected AbstractIndexBasedBigListIterator(long minPos, long initialPos)
-
-
Method Details
-
add
protected abstract void add(long location, long k) Add the given item at the given index.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's appropriate add method, and havinginvalid reference
CollectionLongBigListIterators.AbstractIndexBasedBigIterator.getMaxPos()track the parent.invalid reference
collection's size
Do not modify
LongBigListIterators.AbstractIndexBasedBigIterator.posin this method; the default#add()method takes care of this.See
LongBigListIterators.AbstractIndexBasedBigIterator.posandLongBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
set
protected abstract void set(long location, long k) Sets the given item at the given index.See
LongBigListIterators.AbstractIndexBasedBigIterator.posandLongBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Long>
-
previousLong
public long previousLong()- Specified by:
previousLongin interfaceit.unimi.dsi.fastutil.longs.LongBidirectionalIterator
-
nextIndex
public long nextIndex()- Specified by:
nextIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Long>
-
previousIndex
public long previousIndex()- Specified by:
previousIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Long>
-
add
public void add(long k) - Specified by:
addin interfaceit.unimi.dsi.fastutil.longs.LongBigListIterator
-
set
public void set(long k) - Specified by:
setin interfaceit.unimi.dsi.fastutil.longs.LongBigListIterator
-
back
public long back(long n) - Specified by:
backin interfaceit.unimi.dsi.fastutil.longs.LongBigListIterator
-