|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectcz.cuni.amis.utils.iterators.CircularListIterator<E>
E - contents of the iterablepublic class CircularListIterator<E>
Implements a circular iterator that iterates over any List instance instance.
Useful for obtaining bidirectional ListIterator
Field Summary
protected booleanmoved
protected booleanpassedBeginning
protected booleanpassedEnd
Constructor Summary
CircularListIterator(CircularListIterator<E> source)
Copy constructor for CircularListIterator.
CircularListIterator(List<E> toIterateOver)
Constructs an instance of an CircularListIterator.
CircularListIterator(List<E> toIterateOver,
int index)
Constructs an instance of an CircularListIterator.
Method Summary
voidadd(E e)
intcurrentIndex()
protected Iterable<E>getIterable()
protected Iterator<E>getIterator()
booleanhasNext()
booleanhasPassedBeginning()
booleanhasPassedEnd()
booleanhasPrevious()
Enext()
intnextIndex()
CircularListIterator<E>nextIter()
Eprevious()
intpreviousIndex()
CircularListIterator<E>previousIter()
voidremove()
protected voidrestartIteratorBeginning()
protected voidrestartIteratorEnd()
voidset(E e)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
passedEnd
protected boolean passedEnd
passedBeginning
protected boolean passedBeginning
moved
protected boolean moved
Constructor Detail
CircularListIterator
public CircularListIterator(List<E> toIterateOver)
toIterateOver - List to be iterated over
CircularListIterator
public CircularListIterator(List<E> toIterateOver,
int index)
toIterateOver - List to be iterated overindex - an index to begin iteration at
CircularListIterator
public CircularListIterator(CircularListIterator<E> source)
source -
Method Detail
hasNext
public boolean hasNext()
next
public E next()
remove
public void remove()
hasPassedEnd
public boolean hasPassedEnd()
hasPassedBeginning
public boolean hasPassedBeginning()
getIterable
protected Iterable<E> getIterable()
getIterator
protected Iterator<E> getIterator()
restartIteratorBeginning
protected void restartIteratorBeginning()
restartIteratorEnd
protected void restartIteratorEnd()
add
public void add(E e)
add in interface ListIterator<E>
hasPrevious
public boolean hasPrevious()
hasPrevious in interface ListIterator<E>
nextIndex
public int nextIndex()
nextIndex in interface ListIterator<E>
previous
public E previous()
previous in interface ListIterator<E>
previousIndex
public int previousIndex()
previousIndex in interface ListIterator<E>
set
public void set(E e)
set in interface ListIterator<E>
currentIndex
public int currentIndex()
previousIter
public CircularListIterator<E> previousIter()
nextIter
public CircularListIterator<E> nextIter()
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.