cz.cuni.amis.utils.iterators
Class CircularIterator<E>
java.lang.Object
cz.cuni.amis.utils.iterators.CircularIterator<E>
- Type Parameters:
E
- contents of the iterable
- All Implemented Interfaces:
- Iterator<E>
- Direct Known Subclasses:
- ShiftedCircularIterator
public class CircularIterator<E>
- extends Object
- implements Iterator<E>
Implements a circular iterator that iterates over any reasonable iterable instance.
Not fully tested!
- Author:
- Radek 'Black_Hand' Pibil
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
passedEnd
protected boolean passedEnd
CircularIterator
public CircularIterator(Iterable<E> toIterateOver)
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interface Iterator<E>
next
public E next()
- Specified by:
next
in interface Iterator<E>
remove
public void remove()
- Specified by:
remove
in interface Iterator<E>
hasPassedEnd
public boolean hasPassedEnd()
getIterable
protected Iterable<E> getIterable()
getIterator
protected Iterator<E> getIterator()
restartIterator
protected void restartIterator()
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.