Package org.agrona.collections
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 boolean
Is position valid.private int
private int
private int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
findNext()
Find next element.boolean
hasNext()
Check if there is next element to iterate.(package private) final int
int
Return number of remaining elements.void
remove()
Removes from the underlying collection the last element returned by this iterator.(package private) final void
reset()
-
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:
true
ifremaining > 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.
-