Package squidpony.squidmath
Class MultiArrangement.ValueIterator
java.lang.Object
squidpony.squidmath.MultiArrangement.ValueIterator
- All Implemented Interfaces:
Serializable
,Iterator<Integer>
,ListIterator<Integer>
- Enclosing class:
- MultiArrangement<K>
public final class MultiArrangement.ValueIterator extends Object implements ListIterator<Integer>, Serializable
An iterator on values.
We simply override the ListIterator.next()
/ListIterator.previous()
methods (and possibly their type-specific counterparts) so that they return values
instead of entries.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description ValueIterator()
-
Method Summary
Modifier and Type Method Description void
add(Integer v)
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 v)
int
skip(int n)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.ListIterator
hasNext, hasPrevious, nextIndex, previousIndex
-
Constructor Details
-
ValueIterator
public ValueIterator()
-
-
Method Details
-
previous
- Specified by:
previous
in interfaceListIterator<Integer>
-
previousInt
-
set
- Specified by:
set
in interfaceListIterator<Integer>
-
add
- Specified by:
add
in interfaceListIterator<Integer>
-
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)
-