Package org.agrona.collections
Class Object2ObjectHashMap.EntryIterator
java.lang.Object
org.agrona.collections.Object2ObjectHashMap.EntryIterator
- Enclosing class:
- Object2ObjectHashMap<K,
V>
public final class Object2ObjectHashMap.EntryIterator
extends Object
implements Iterator<Map.Entry<K,V>>, Map.Entry<K,V>
An iterator over entries.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected final voidfindNext()Find next element.getKey()getValue()inthashCode()booleanhasNext()Check if there is next element to iterate.next()intReturn number of remaining elements.voidremove()Removes from the underlying collection the last element returned by this iterator.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, remove
-
Field Details
-
isPositionValid
protected boolean isPositionValidIs position valid.
-
-
Constructor Details
-
EntryIterator
public EntryIterator()Create a new instance.
-
-
Method Details
-
getKey
-
getValue
-
setValue
-
next
-
hashCode
public int hashCode() -
equals
-
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.
-