Package org.agrona.collections
Class Object2ObjectHashMap.KeyIterator
java.lang.Object
org.agrona.collections.Object2ObjectHashMap.KeyIterator
- All Implemented Interfaces:
Iterator<K>
- Enclosing class:
- Object2ObjectHashMap<K,
V>
An iterator over keys.
-
Field Details
-
isPositionValid
protected boolean isPositionValidIs position valid.
-
-
Constructor Details
-
KeyIterator
public KeyIterator()Create a new instance.
-
-
Method Details
-
next
-
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.
-