E
- contents of the iterablepublic class CircularListIterator<E> extends Object implements ListIterator<E>
Modifier and Type | Field and Description |
---|---|
protected boolean |
moved |
protected boolean |
passedBeginning |
protected boolean |
passedEnd |
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
add(E e) |
int |
currentIndex() |
protected Iterable<E> |
getIterable() |
protected Iterator<E> |
getIterator() |
boolean |
hasNext() |
boolean |
hasPassedBeginning() |
boolean |
hasPassedEnd() |
boolean |
hasPrevious() |
E |
next() |
int |
nextIndex() |
CircularListIterator<E> |
nextIter() |
E |
previous() |
int |
previousIndex() |
CircularListIterator<E> |
previousIter() |
void |
remove() |
protected void |
restartIteratorBeginning() |
protected void |
restartIteratorEnd() |
void |
set(E e) |
protected boolean passedEnd
protected boolean passedBeginning
protected boolean moved
public CircularListIterator(List<E> toIterateOver)
toIterateOver
- List to be iterated overpublic CircularListIterator(List<E> toIterateOver, int index)
toIterateOver
- List to be iterated overindex
- an index to begin iteration atpublic CircularListIterator(CircularListIterator<E> source)
source
- public boolean hasNext()
public E next()
public void remove()
public boolean hasPassedEnd()
public boolean hasPassedBeginning()
protected void restartIteratorBeginning()
protected void restartIteratorEnd()
public void add(E e)
add
in interface ListIterator<E>
public boolean hasPrevious()
hasPrevious
in interface ListIterator<E>
public int nextIndex()
nextIndex
in interface ListIterator<E>
public E previous()
previous
in interface ListIterator<E>
public int previousIndex()
previousIndex
in interface ListIterator<E>
public void set(E e)
set
in interface ListIterator<E>
public int currentIndex()
public CircularListIterator<E> previousIter()
public CircularListIterator<E> nextIter()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.