Class ByteBigListIterators.AbstractIndexBasedBigListIterator
- All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Byte>,it.unimi.dsi.fastutil.BigListIterator<Byte>,it.unimi.dsi.fastutil.bytes.ByteBidirectionalIterator,it.unimi.dsi.fastutil.bytes.ByteBigListIterator,it.unimi.dsi.fastutil.bytes.ByteIterator,it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Byte>,it.unimi.dsi.fastutil.objects.ObjectIterator<Byte>,Iterator<Byte>,PrimitiveIterator<Byte,it.unimi.dsi.fastutil.bytes.ByteConsumer>
- Enclosing class:
ByteBigListIterators
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.bytes.ByteBigListIterators.AbstractIndexBasedBigIterator
lastReturned, minPos, pos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractIndexBasedBigListIterator(long minPos, long initialPos) -
Method Summary
Methods inherited from class it.unimi.dsi.fastutil.bytes.ByteBigListIterators.AbstractIndexBasedBigIterator
forEachRemaining, get, getMaxPos, hasNext, nextByte, 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.bytes.ByteBidirectionalIterator
back, previousMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteBigListIterator
add, set, skip, skipMethods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterator
forEachRemaining, forEachRemaining, forEachRemaining, next, nextByte
-
Constructor Details
-
AbstractIndexBasedBigListIterator
protected AbstractIndexBasedBigListIterator(long minPos, long initialPos)
-
-
Method Details
-
add
protected abstract void add(long location, byte k) Add the given item at the given index.This method should also do what is needed to track the change to the
ByteBigListIterators.AbstractIndexBasedBigIterator.getMaxPos(). Usually this is accomplished by having this method call the parent's appropriate add method, and havinginvalid reference
CollectionByteBigListIterators.AbstractIndexBasedBigIterator.getMaxPos()track the parent.invalid reference
collection's size
Do not modify
ByteBigListIterators.AbstractIndexBasedBigIterator.posin this method; the default#add()method takes care of this.See
ByteBigListIterators.AbstractIndexBasedBigIterator.posandByteBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
set
protected abstract void set(long location, byte k) Sets the given item at the given index.See
ByteBigListIterators.AbstractIndexBasedBigIterator.posandByteBigListIterators.AbstractIndexBasedBigIterator.get(int)for discussion on what the location means. -
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceit.unimi.dsi.fastutil.BidirectionalIterator<Byte>
-
previousByte
public byte previousByte()- Specified by:
previousBytein interfaceit.unimi.dsi.fastutil.bytes.ByteBidirectionalIterator
-
nextIndex
public long nextIndex()- Specified by:
nextIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Byte>
-
previousIndex
public long previousIndex()- Specified by:
previousIndexin interfaceit.unimi.dsi.fastutil.BigListIterator<Byte>
-
add
public void add(byte k) - Specified by:
addin interfaceit.unimi.dsi.fastutil.bytes.ByteBigListIterator
-
set
public void set(byte k) - Specified by:
setin interfaceit.unimi.dsi.fastutil.bytes.ByteBigListIterator
-
back
public long back(long n) - Specified by:
backin interfaceit.unimi.dsi.fastutil.bytes.ByteBigListIterator
-