Package org.apache.commons.math3.util
Class OpenIntToDoubleHashMap.Iterator
java.lang.Object
org.apache.commons.math3.util.OpenIntToDoubleHashMap.Iterator
- Enclosing class:
OpenIntToDoubleHashMap
Iterator class for the map.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
Index of current element.private int
Index of next element.private final int
Reference modification count. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
referenceCount
private final int referenceCountReference modification count. -
current
private int currentIndex of current element. -
next
private int nextIndex of next element.
-
-
Constructor Details
-
Iterator
private Iterator()Simple constructor.
-
-
Method Details
-
hasNext
public boolean hasNext()Check if there is a next element in the map.- Returns:
- true if there is a next element
-
key
Get the key of current entry.- Returns:
- key of current entry
- Throws:
ConcurrentModificationException
- if the map is modified during iterationNoSuchElementException
- if there is no element left in the map
-
value
Get the value of current entry.- Returns:
- value of current entry
- Throws:
ConcurrentModificationException
- if the map is modified during iterationNoSuchElementException
- if there is no element left in the map
-
advance
Advance iterator one step further.- Throws:
ConcurrentModificationException
- if the map is modified during iterationNoSuchElementException
- if there is no element left in the map
-