Package org.agrona.collections
Class LongHashSet.LongIterator
java.lang.Object
org.agrona.collections.LongHashSet.LongIterator
- Enclosing class:
LongHashSet
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()
long
Strongly typed alternative ofIterator.next()
to avoid boxing.private int
position
(long[] values) int
Returns number of remaining (not yet visited) elements.void
remove()
(package private) LongHashSet.LongIterator
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
-
LongIterator
public LongIterator()Create a new instance.
-
-
Method Details
-
reset
LongHashSet.LongIterator 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 long nextValue()Strongly typed alternative ofIterator.next()
to avoid boxing.- Returns:
- the next long value.
-
remove
public void remove() -
findNext
private void findNext() -
position
private int position(long[] values)
-