Package org.codehaus.commons.compiler.util.iterator

# 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>
A `ListIterator` that reverses the direction of all operations of a delegate `ListIterator`.

## 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

Modifier and Type
Method
Description
`boolean`
`hasNext()`
Calls `FilterListIterator.delegate`.`ListIterator.hasPrevious()`
`boolean`
`hasPrevious()`
Calls `FilterListIterator.delegate`.`ListIterator.hasNext()`
`T`
`next()`
Calls `FilterListIterator.delegate`.`ListIterator.previous()`
`int`
`nextIndex()`
Throws an `UnsupportedOperationException`.
`T`
`previous()`
Calls `FilterListIterator.delegate`.`ListIterator.next()`
`int`
`previousIndex()`
Throws an `UnsupportedOperationException`.

### 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 Details

### ReverseListIterator

public ReverseListIterator(ListIterator<T> delegate)

## Method Details

### hasNext

public boolean hasNext()
Calls `FilterListIterator.delegate`.`ListIterator.hasPrevious()`

Specified by:
  `hasNext` in interface `Iterator<T>`
Specified by:
  `hasNext` in interface `ListIterator<T>`
Overrides:
  `hasNext` in class `FilterListIterator<T>`

### hasPrevious

public boolean hasPrevious()
Calls `FilterListIterator.delegate`.`ListIterator.hasNext()`

Specified by:
  `hasPrevious` in interface `ListIterator<T>`
Overrides:
  `hasPrevious` in class `FilterListIterator<T>`

### next

public T next()
Calls `FilterListIterator.delegate`.`ListIterator.previous()`

Specified by:
  `next` in interface `Iterator<T>`
Specified by:
  `next` in interface `ListIterator<T>`
Overrides:
  `next` in class `FilterListIterator<T>`

### previous

public T previous()
Calls `FilterListIterator.delegate`.`ListIterator.next()`

Specified by:
  `previous` in interface `ListIterator<T>`
Overrides:
  `previous` in class `FilterListIterator<T>`

### nextIndex

public int nextIndex()
Throws an `UnsupportedOperationException`.

Specified by:
  `nextIndex` in interface `ListIterator<T>`
Overrides:
  `nextIndex` in class `FilterListIterator<T>`

### previousIndex

public int previousIndex()
Throws an `UnsupportedOperationException`.

Specified by:
  `previousIndex` in interface `ListIterator<T>`
Overrides:
  `previousIndex` in class `FilterListIterator<T>`