I - the key typeprivate class HashMap.KeyIterator<I>
extends java.lang.Object
implements java.lang.Iterable<I>, java.util.Iterator<I>
| Modifier and Type | Field and Description |
|---|---|
private int |
pos
Stores the current iterator position.
|
| Constructor and Description |
|---|
KeyIterator()
Creates a new iterator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns whether there is a next element.
|
java.util.Iterator<I> |
iterator()
Returns the iterator.
|
I |
next()
Returns the next element in the iterator sequence.
|
void |
remove()
Removes the actual element.
|
public java.util.Iterator<I> iterator()
iterator in interface java.lang.Iterable<I>public boolean hasNext()
hasNext in interface java.util.Iterator<I>true if there is a next element,
false elsepublic I next()
next in interface java.util.Iterator<I>public void remove()
remove in interface java.util.Iterator<I>