Package squidpony.squidmath
Class IntIntOrderedMap.KeyIterator
java.lang.Object
squidpony.squidmath.IntIntOrderedMap.KeyIterator
- All Implemented Interfaces:
Serializable
,Iterator<Integer>
- Enclosing class:
- IntIntOrderedMap
public final class IntIntOrderedMap.KeyIterator extends Object implements Iterator<Integer>, Serializable
An iterator on keys.
We simply override the ListIterator.next()
/ListIterator.previous()
methods (and possibly their type-specific counterparts) so that they return keys
instead of entries.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description KeyIterator()
-
Method Summary
Modifier and Type Method Description void
add(Integer k)
int
back(int n)
boolean
hasNext()
boolean
hasPrevious()
Integer
next()
int
nextEntry()
int
nextIndex()
int
nextInt()
Integer
previous()
int
previousEntry()
int
previousIndex()
int
previousInt()
void
remove()
void
set(Integer k)
int
skip(int n)
-
Constructor Details
-
KeyIterator
public KeyIterator()
-
-
Method Details
-
previous
-
previousInt
-
set
-
add
-
next
-
nextInt
-
remove
-
hasNext
public boolean hasNext() -
hasPrevious
public boolean hasPrevious() -
nextIndex
public int nextIndex() -
previousIndex
public int previousIndex() -
nextEntry
public int nextEntry() -
previousEntry
public int previousEntry() -
skip
public int skip(int n) -
back
public int back(int n)
-