protected class AbstractIntHashMap.MapIterator extends java.lang.Object implements java.util.Iterator<AbstractIntHashMap.MapElement>, java.lang.Iterable<AbstractIntHashMap.MapElement>
| Modifier and Type | Field and Description |
|---|---|
private AbstractIntHashMap.MapElement |
current
Stores the current element.
|
private int |
pos
Stores the position.
|
| Constructor and Description |
|---|
MapIterator()
Initializes the iterator and places it to the first element.
|
| Modifier and Type | Method and Description |
|---|---|
protected AbstractIntHashMap.MapElement |
findNext(boolean throwException)
Searches for the next element, either in
AbstractIntHashMap.map or in the
map element chains and returns the current element (current
before call). |
boolean |
hasNext()
Returns whether there is a next element.
|
java.util.Iterator<AbstractIntHashMap.MapElement> |
iterator()
Returns an iterator over a set of elements of type T.
|
AbstractIntHashMap.MapElement |
next()
Returns the next element.
|
void |
remove()
Removes the current element.
|
private int pos
private AbstractIntHashMap.MapElement current
public MapIterator()
public AbstractIntHashMap.MapElement next()
next in interface java.util.Iterator<AbstractIntHashMap.MapElement>java.util.NoSuchElementException - in case that there is no next elementpublic java.util.Iterator<AbstractIntHashMap.MapElement> iterator()
iterator in interface java.lang.Iterable<AbstractIntHashMap.MapElement>public boolean hasNext()
hasNext in interface java.util.Iterator<AbstractIntHashMap.MapElement>true if there is a next element,
false elseprotected AbstractIntHashMap.MapElement findNext(boolean throwException)
AbstractIntHashMap.map or in the
map element chains and returns the current element (current
before call). This method modifies current as a side effect.throwException - whether this method should throw an exception
if there is no next elementthrowException is falsejava.util.NoSuchElementException - in case that
throwException is true and there is no
next elementpublic void remove()
remove in interface java.util.Iterator<AbstractIntHashMap.MapElement>java.lang.UnsupportedOperationException - always