Package org.agrona.collections
Class Int2IntHashMap.AbstractIterator
- java.lang.Object
-
- org.agrona.collections.Int2IntHashMap.AbstractIterator
-
- Direct Known Subclasses:
Int2IntHashMap.EntryIterator
,Int2IntHashMap.KeyIterator
,Int2IntHashMap.ValueIterator
- Enclosing class:
- Int2IntHashMap
abstract class Int2IntHashMap.AbstractIterator extends java.lang.Object
Base iterator implementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
isPositionValid
Is current position valid.private int
positionCounter
private int
remaining
private int
stopCounter
-
Constructor Summary
Constructors Constructor Description AbstractIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
findNext()
Advance to the next entry.boolean
hasNext()
Check if there are more elements remaining.protected int
keyPosition()
Returns position of the key of the current entry.int
remaining()
Number of remaining elements.void
remove()
(package private) void
reset()
-
-
-
Method Detail
-
reset
final void reset()
-
keyPosition
protected final int keyPosition()
Returns position of the key of the current entry.- Returns:
- key position.
-
remaining
public int remaining()
Number of remaining elements.- Returns:
- number of remaining elements.
-
hasNext
public boolean hasNext()
Check if there are more elements remaining.- Returns:
true
ifremaining > 0
.
-
findNext
protected final void findNext()
Advance to the next entry.- Throws:
java.util.NoSuchElementException
- if no more entries available.
-
remove
public void remove()
-
-