protected class AbstractLongHashMap.MapIterator extends java.lang.Object implements java.util.Iterator<AbstractLongHashMap.MapElement>, java.lang.Iterable<AbstractLongHashMap.MapElement>
| Modifier and Type | Field and Description |
|---|---|
private AbstractLongHashMap.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 AbstractLongHashMap.MapElement |
findNext(boolean throwException)
Searches for the next element, either in
AbstractLongHashMap.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<AbstractLongHashMap.MapElement> |
iterator()
Returns an iterator over a set of elements of type T.
|
AbstractLongHashMap.MapElement |
next()
Returns the next element.
|
void |
remove()
Removes the current element.
|
private int pos
private AbstractLongHashMap.MapElement current
public MapIterator()
public AbstractLongHashMap.MapElement next()
next in interface java.util.Iterator<AbstractLongHashMap.MapElement>java.util.NoSuchElementException - in case that there is no next elementpublic java.util.Iterator<AbstractLongHashMap.MapElement> iterator()
iterator in interface java.lang.Iterable<AbstractLongHashMap.MapElement>public boolean hasNext()
hasNext in interface java.util.Iterator<AbstractLongHashMap.MapElement>true if there is a next element,
false elseprotected AbstractLongHashMap.MapElement findNext(boolean throwException)
AbstractLongHashMap.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<AbstractLongHashMap.MapElement>java.lang.UnsupportedOperationException - always