Class IntHashSet.IntIterator
java.lang.Object
org.agrona.collections.IntHashSet.IntIterator
- Enclosing class:
IntHashSet
Iterator which supports unboxed access to the values via
nextValue().-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate intprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidfindNext()booleanhasNext()next()intStrongly typed alternative ofIterator.next()to avoid boxing.private intposition(int[] values) intReturns number of remaining (not yet visited) elements.voidremove()(package private) IntHashSet.IntIteratorreset()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Field Details
-
remaining
private int remaining -
positionCounter
private int positionCounter -
stopCounter
private int stopCounter -
isPositionValid
private boolean isPositionValid
-
-
Constructor Details
-
IntIterator
public IntIterator()Create a new instance.
-
-
Method Details
-
reset
IntHashSet.IntIterator reset() -
hasNext
-
remaining
public int remaining()Returns number of remaining (not yet visited) elements.- Returns:
- number of remaining elements.
-
next
-
nextValue
public int nextValue()Strongly typed alternative ofIterator.next()to avoid boxing.- Returns:
- the next int value.
-
remove
-
findNext
private void findNext() -
position
private int position(int[] values)
-