Package org.agrona.collections
Class Object2IntHashMap.EntryIterator
java.lang.Object
org.agrona.collections.Object2IntHashMap.EntryIterator
- Enclosing class:
- Object2IntHashMap<K>
Iterator over entries which can provide unboxed access and optionally avoid allocation.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected final voidfindNext()Find next element.intGet int value without boxing.getKey()getValue()inthashCode()booleanhasNext()next()protected final intposition()Position of the current element.voidremove()intsetValue(int value) Set value at current position without boxing.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
EntryIterator
public EntryIterator()Create a new instance.
-
-
Method Details
-
next
-
getKey
-
getIntValue
public int getIntValue()Get int value without boxing.- Returns:
- value.
-
getValue
-
setValue
-
setValue
public int setValue(int value) Set value at current position without boxing.- Parameters:
value- to be set.- Returns:
- old value.
- Throws:
IllegalArgumentException- ifmissingValue == value.
-
hashCode
public int hashCode() -
equals
-
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.
-
remove
public void remove()
-