Class ShortBigListIterators.AbstractIndexBasedBigListIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Short>,it.unimi.dsi.fastutil.BigListIterator<Short>,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Short>,it.unimi.dsi.fastutil.objects.ObjectIterator<Short>,it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator,it.unimi.dsi.fastutil.shorts.ShortBigListIterator,it.unimi.dsi.fastutil.shorts.ShortIterator,Iterator<Short>,PrimitiveIterator<Short,it.unimi.dsi.fastutil.shorts.ShortConsumer>
- Enclosing class:
ShortBigListIterators
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.shorts.ShortBigListIterators.AbstractIndexBasedBigIterator
lastReturned, minPos, pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractIndexBasedBigListIterator(long minPos, long initialPos) -
Method Summary
Methods inherited from class it.unimi.dsi.fastutil.shorts.ShortBigListIterators.AbstractIndexBasedBigIterator
forEachRemaining, get, getMaxPos, hasNext, nextShort, remove, remove, skip, skipMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator
back, previousMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortBigListIterator
add, set, skip, skipMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterator
forEachRemaining, forEachRemaining, forEachRemaining, next, nextShort
-
Constructor Details
-
AbstractIndexBasedBigListIterator
protected AbstractIndexBasedBigListIterator(long minPos, long initialPos)
-
-
Method Details
-
add
protected abstract void add(long location, short k) Add the given item at the given index.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's appropriate add method, and havinginvalid reference
CollectionShortBigListIterators.AbstractIndexBasedBigIterator.getMaxPos()track the parent.invalid reference
collection's size
Do not modify
ShortBigListIterators.AbstractIndexBasedBigIterator.posin this method; the default#add()method takes care of this.See
ShortBigListIterators.AbstractIndexBasedBigIterator.posandShortBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
set
protected abstract void set(long location, short k) Sets the given item at the given index.See
ShortBigListIterators.AbstractIndexBasedBigIterator.posandShortBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Short>
-
previousShort
public short previousShort()- Specified by:
previousShortin interfaceit.unimi.dsi.fastutil.shorts.ShortBidirectionalIterator
-
nextIndex
public long nextIndex()- Specified by:
nextIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Short>
-
previousIndex
public long previousIndex()- Specified by:
previousIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Short>
-
add
public void add(short k) - Specified by:
addin interfaceit.unimi.dsi.fastutil.shorts.ShortBigListIterator
-
set
public void set(short k) - Specified by:
setin interfaceit.unimi.dsi.fastutil.shorts.ShortBigListIterator
-
back
public long back(long n) - Specified by:
backin interfaceit.unimi.dsi.fastutil.shorts.ShortBigListIterator
-