Package org.agrona.collections
Class IntHashSet.IntIterator
- java.lang.Object
-
- org.agrona.collections.IntHashSet.IntIterator
-
- All Implemented Interfaces:
java.util.Iterator<java.lang.Integer>
- Enclosing class:
- IntHashSet
public final class IntHashSet.IntIterator extends java.lang.Object implements java.util.Iterator<java.lang.Integer>
Iterator which supports unboxed access to the values vianextValue()
.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
isPositionValid
private int
positionCounter
private int
remaining
private int
stopCounter
-
Constructor Summary
Constructors Constructor Description IntIterator()
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
findNext()
boolean
hasNext()
java.lang.Integer
next()
int
nextValue()
Strongly typed alternative ofIterator.next()
to avoid boxing.private int
position(int[] values)
int
remaining()
Returns number of remaining (not yet visited) elements.void
remove()
(package private) IntHashSet.IntIterator
reset()
-
-
-
Method Detail
-
reset
IntHashSet.IntIterator reset()
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<java.lang.Integer>
-
remaining
public int remaining()
Returns number of remaining (not yet visited) elements.- Returns:
- number of remaining elements.
-
next
public java.lang.Integer next()
- Specified by:
next
in interfacejava.util.Iterator<java.lang.Integer>
-
nextValue
public int nextValue()
Strongly typed alternative ofIterator.next()
to avoid boxing.- Returns:
- the next int value.
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<java.lang.Integer>
-
findNext
private void findNext()
-
position
private int position(int[] values)
-
-