cz.cuni.amis.utils.iterators
Class ShiftedCircularIterator<E>
java.lang.Object
cz.cuni.amis.utils.iterators.CircularIterator<E>
cz.cuni.amis.utils.iterators.ShiftedCircularIterator<E>
- Type Parameters:
E
-
- All Implemented Interfaces:
- Iterator<E>
public class ShiftedCircularIterator<E>
- extends CircularIterator<E>
Circular iterator that can start from any given position in given iterable.
Even less tested then CircularIterator
or CircularListIterator
.
- Author:
- Radek 'Black_Hand' Pibil
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShiftedCircularIterator
public ShiftedCircularIterator(Iterable<E> toIterateOver,
int steps)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<E>
- Overrides:
hasNext
in class CircularIterator<E>
next
public E next()
- Specified by:
next
in interface Iterator<E>
- Overrides:
next
in class CircularIterator<E>
remove
public void remove()
- Specified by:
remove
in interface Iterator<E>
- Overrides:
remove
in class CircularIterator<E>
hasPassedEnd
public boolean hasPassedEnd()
- Overrides:
hasPassedEnd
in class CircularIterator<E>
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.