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 protected
BaseIterator()
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
advance()
Advance iterator one step further.protected int
getCurrent()
Get index of current entry.boolean
hasNext()
Check if there is a next element in the map.int
key()
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, NoSuchElementException
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
-
advance
public void advance() throws ConcurrentModificationException, NoSuchElementException
Advance iterator one step further.- Throws:
ConcurrentModificationException
- if the map is modified during iterationNoSuchElementException
- if there is no element left in the map
-
-