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

Package class diagram package ShiftedCircularIterator
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:
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

Field Summary
 
Fields inherited from class cz.cuni.amis.utils.iterators.CircularIterator
passedEnd
 
Constructor Summary
ShiftedCircularIterator(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(Iterable<E> toIterateOver,
                               int steps)
Method Detail

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.