Class Object2ObjectHashMap.AbstractIterator
java.lang.Object
org.agrona.collections.Object2ObjectHashMap.AbstractIterator
- Direct Known Subclasses:
Object2ObjectHashMap.EntryIterator, Object2ObjectHashMap.KeyIterator, Object2ObjectHashMap.ValueIterator
- Enclosing class:
Object2ObjectHashMap<K,V>
Base iterator impl.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIs position valid.private intprivate intprivate int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidfindNext()Find next element.booleanhasNext()Check if there is next element to iterate.(package private) final intintReturn number of remaining elements.voidremove()Removes from the underlying collection the last element returned by this iterator.(package private) final voidreset()
-
Field Details
-
isPositionValid
protected boolean isPositionValidIs position valid. -
remaining
private int remaining -
positionCounter
private int positionCounter -
stopCounter
private int stopCounter
-
-
Constructor Details
-
AbstractIterator
AbstractIterator()
-
-
Method Details
-
reset
final void reset() -
keyPosition
final int keyPosition() -
remaining
public int remaining()Return number of remaining elements.- Returns:
- number of remaining elements.
-
hasNext
public boolean hasNext()Check if there is next element to iterate.- Returns:
trueifremaining > 0.
-
findNext
protected final void findNext()Find next element.- Throws:
NoSuchElementException- if no more elements.
-
remove
public void remove()Removes from the underlying collection the last element returned by this iterator.
-