Package org.agrona.collections
Class Int2ObjectHashMap.AbstractIterator<T>
- java.lang.Object
-
- org.agrona.collections.Int2ObjectHashMap.AbstractIterator<T>
-
- Type Parameters:
T
- type of elements.
- All Implemented Interfaces:
java.util.Iterator<T>
- Direct Known Subclasses:
Int2ObjectHashMap.EntryIterator
,Int2ObjectHashMap.KeyIterator
,Int2ObjectHashMap.ValueIterator
- Enclosing class:
- Int2ObjectHashMap<V>
abstract class Int2ObjectHashMap.AbstractIterator<T> extends java.lang.Object implements java.util.Iterator<T>
Base iterator implementation that contains basic logic of traversing the element in the backing array.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
isPositionValid
private int
posCounter
private int
remaining
private int
stopCounter
-
Constructor Summary
Constructors Constructor Description AbstractIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
findNext()
Find the next element.boolean
hasNext()
abstract T
next()
protected int
position()
Position of the current element.int
remaining()
Number of remaining elements.void
remove()
(package private) void
reset()
-
-
-
Method Detail
-
position
protected final int position()
Position of the current element.- Returns:
- position of the current element.
-
remaining
public int remaining()
Number of remaining elements.- Returns:
- number of remaining elements.
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
findNext
protected final void findNext()
Find the next element.- Throws:
java.util.NoSuchElementException
- if no more elements.
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
reset
final void reset()
-
-