Class DoubleBigListIterators.AbstractIndexBasedBigListIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Double>,it.unimi.dsi.fastutil.BigListIterator<Double>,it.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterator,it.unimi.dsi.fastutil.doubles.DoubleBigListIterator,it.unimi.dsi.fastutil.doubles.DoubleIterator,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Double>,it.unimi.dsi.fastutil.objects.ObjectIterator<Double>,Iterator<Double>,PrimitiveIterator<Double,,DoubleConsumer> PrimitiveIterator.OfDouble
- Enclosing class:
DoubleBigListIterators
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.doubles.DoubleBigListIterators.AbstractIndexBasedBigIterator
lastReturned, minPos, pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractIndexBasedBigListIterator(long minPos, long initialPos) -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double k) protected abstract voidadd(long location, double k) Add the given item at the given index.longback(long n) booleanlongdoublelongvoidset(double k) protected abstract voidset(long location, double k) Sets the given item at the given index.Methods inherited from class it.unimi.dsi.fastutil.doubles.DoubleBigListIterators.AbstractIndexBasedBigIterator
forEachRemaining, get, getMaxPos, hasNext, nextDouble, remove, remove, skip, skipMethods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleIterator
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.doubles.DoubleBidirectionalIterator
back, previousMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleBigListIterator
add, set, skip, skipMethods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleIterator
forEachRemaining, forEachRemaining, next, nextDoubleMethods inherited from interface java.util.PrimitiveIterator.OfDouble
forEachRemaining
-
Constructor Details
-
AbstractIndexBasedBigListIterator
protected AbstractIndexBasedBigListIterator(long minPos, long initialPos)
-
-
Method Details
-
add
protected abstract void add(long location, double k) Add the given item at the given index.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's appropriate add method, and havinginvalid reference
CollectionDoubleBigListIterators.AbstractIndexBasedBigIterator.getMaxPos()track the parent.invalid reference
collection's size
Do not modify
DoubleBigListIterators.AbstractIndexBasedBigIterator.posin this method; the default#add()method takes care of this.See
DoubleBigListIterators.AbstractIndexBasedBigIterator.posandDoubleBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
set
protected abstract void set(long location, double k) Sets the given item at the given index.See
DoubleBigListIterators.AbstractIndexBasedBigIterator.posandDoubleBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Double>
-
previousDouble
public double previousDouble()- Specified by:
previousDoublein interfaceit.unimi.dsi.fastutil.doubles.DoubleBidirectionalIterator
-
nextIndex
public long nextIndex()- Specified by:
nextIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Double>
-
previousIndex
public long previousIndex()- Specified by:
previousIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Double>
-
add
public void add(double k) - Specified by:
addin interfaceit.unimi.dsi.fastutil.doubles.DoubleBigListIterator
-
set
public void set(double k) - Specified by:
setin interfaceit.unimi.dsi.fastutil.doubles.DoubleBigListIterator
-
back
public long back(long n) - Specified by:
backin interfaceit.unimi.dsi.fastutil.doubles.DoubleBigListIterator
-