Package org.hipparchus.util
Class AbstractOpenIntHashMap.BaseIterator
- java.lang.Object
-
- org.hipparchus.util.AbstractOpenIntHashMap.BaseIterator
-
- Direct Known Subclasses:
OpenIntToDoubleHashMap.Iterator,OpenIntToFieldHashMap.Iterator
- Enclosing class:
- AbstractOpenIntHashMap
protected class AbstractOpenIntHashMap.BaseIterator extends Object
Iterator class for the map.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseIterator()Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadvance()Advance iterator one step further.protected intgetCurrent()Get index of current entry.booleanhasNext()Check if there is a next element in the map.intkey()Get the key of current entry.
-
-
-
Method Detail
-
hasNext
public boolean hasNext()
Check if there is a next element in the map.- Returns:
- true if there is a next element
-
getCurrent
protected int getCurrent()
Get index of current entry.- Returns:
- key of current entry
- Since:
- 3.1
-
key
public int key() throws ConcurrentModificationException, NoSuchElementExceptionGet 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
-
advance
public void advance() throws ConcurrentModificationException, NoSuchElementExceptionAdvance iterator one step further.- Throws:
ConcurrentModificationException- if the map is modified during iterationNoSuchElementException- if there is no element left in the map
-
-