Package org.agrona.collections
Class Object2IntHashMap.AbstractIterator<T>
java.lang.Object
org.agrona.collections.Object2IntHashMap.AbstractIterator<T>
- Type Parameters:
T
- type of elements.
- All Implemented Interfaces:
Iterator<T>
- Direct Known Subclasses:
Object2IntHashMap.EntryIterator
,Object2IntHashMap.KeyIterator
,Object2IntHashMap.ValueIterator
- Enclosing class:
Object2IntHashMap<K>
Base iterator implementation that contains basic logic of traversing the element in the backing array.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private int
private int
private int
-
Constructor Summary
Constructors -
Method Summary
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
-
posCounter
private int posCounter -
stopCounter
private int stopCounter -
remaining
private int remaining -
isPositionValid
private boolean isPositionValid
-
-
Constructor Details
-
AbstractIterator
AbstractIterator()
-
-
Method Details
-
position
protected final int position()Position of the current element.- Returns:
- position of the element in the array.
-
hasNext
public boolean hasNext() -
findNext
protected final void findNext()Find next element.- Throws:
NoSuchElementException
- if no more elements.
-
next
-
remove
public void remove() -
reset
final void reset()
-