cz.cuni.amis.utils.iterators
Class ShiftedCircularIterator<E>

java.lang.Object
  extended by cz.cuni.amis.utils.iterators.CircularIterator<E>
      extended by cz.cuni.amis.utils.iterators.ShiftedCircularIterator<E>
Type Parameters:
E -
All Implemented Interfaces:
java.util.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.


Field Summary
 
Fields inherited from class cz.cuni.amis.utils.iterators.CircularIterator
passedEnd
 
Constructor Summary
ShiftedCircularIterator(java.lang.Iterable<E> toIterateOver, int steps)
           
 
Method Summary
 boolean hasNext()
           
 boolean hasPassedEnd()
           
 E next()
           
 void remove()
           
 
Methods inherited from class cz.cuni.amis.utils.iterators.CircularIterator
getIterable, getIterator, restartIterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShiftedCircularIterator

public ShiftedCircularIterator(java.lang.Iterable<E> toIterateOver,
                               int steps)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface java.util.Iterator<E>
Overrides:
hasNext in class CircularIterator<E>

next

public E next()
Specified by:
next in interface java.util.Iterator<E>
Overrides:
next in class CircularIterator<E>

remove

public void remove()
Specified by:
remove in interface java.util.Iterator<E>
Overrides:
remove in class CircularIterator<E>

hasPassedEnd

public boolean hasPassedEnd()
Overrides:
hasPassedEnd in class CircularIterator<E>