Package org.agrona.collections
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 boolean
private int
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
findNext()
boolean
hasNext()
next()
int
Strongly typed alternative ofIterator.next()
to avoid boxing.private int
position
(int[] values) int
Returns number of remaining (not yet visited) elements.void
remove()
(package private) IntHashSet.IntIterator
reset()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.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
public boolean 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
public void remove() -
findNext
private void findNext() -
position
private int position(int[] values)
-