Class ReverseListIterator<T>
- java.lang.Object
-
- org.codehaus.commons.compiler.util.iterator.FilterListIterator<T>
-
- org.codehaus.commons.compiler.util.iterator.ReverseListIterator<T>
-
- Type Parameters:
T
- The element type of the list iterator
- All Implemented Interfaces:
Iterator<T>
,ListIterator<T>
public class ReverseListIterator<T> extends FilterListIterator<T>
AListIterator
that reverses the direction of all operations of a delegateListIterator
.
-
-
Field Summary
-
Fields inherited from class org.codehaus.commons.compiler.util.iterator.FilterListIterator
delegate
-
-
Constructor Summary
Constructors Constructor Description ReverseListIterator(ListIterator<T> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
boolean
hasPrevious()
T
next()
int
nextIndex()
Throws anUnsupportedOperationException
.T
previous()
int
previousIndex()
Throws anUnsupportedOperationException
.-
Methods inherited from class org.codehaus.commons.compiler.util.iterator.FilterListIterator
add, remove, set
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
ReverseListIterator
public ReverseListIterator(ListIterator<T> delegate)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<T>
- Specified by:
hasNext
in interfaceListIterator<T>
- Overrides:
hasNext
in classFilterListIterator<T>
-
hasPrevious
public boolean hasPrevious()
- Specified by:
hasPrevious
in interfaceListIterator<T>
- Overrides:
hasPrevious
in classFilterListIterator<T>
-
next
public T next()
- Specified by:
next
in interfaceIterator<T>
- Specified by:
next
in interfaceListIterator<T>
- Overrides:
next
in classFilterListIterator<T>
-
previous
public T previous()
- Specified by:
previous
in interfaceListIterator<T>
- Overrides:
previous
in classFilterListIterator<T>
-
nextIndex
public int nextIndex()
Throws anUnsupportedOperationException
.- Specified by:
nextIndex
in interfaceListIterator<T>
- Overrides:
nextIndex
in classFilterListIterator<T>
-
previousIndex
public int previousIndex()
Throws anUnsupportedOperationException
.- Specified by:
previousIndex
in interfaceListIterator<T>
- Overrides:
previousIndex
in classFilterListIterator<T>
-
-