Package squidpony.squidmath
Class Arrangement.ValueIterator
java.lang.Object
squidpony.squidmath.Arrangement.ValueIterator
- All Implemented Interfaces:
Serializable,Iterator<Integer>,ListIterator<Integer>
- Enclosing class:
- Arrangement<K>
public final class Arrangement.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 voidadd(Integer v)intback(int n)booleanhasNext()booleanhasPrevious()Integernext()intnextEntry()intnextIndex()intnextInt()Integerprevious()intpreviousEntry()intpreviousIndex()intpreviousInt()voidremove()voidset(Integer v)intskip(int n)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.ListIterator
hasNext, hasPrevious, nextIndex, previousIndex
-
Constructor Details
-
ValueIterator
public ValueIterator()
-
-
Method Details
-
previous
- Specified by:
previousin interfaceListIterator<Integer>
-
previousInt
-
set
- Specified by:
setin interfaceListIterator<Integer>
-
add
- Specified by:
addin 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)
-