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