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

# Class FilterListIterator<T>

java.lang.Object
org.codehaus.commons.compiler.util.iterator.FilterListIterator<T>

Type Parameters:
  `T` - The element type of the list iterator

All Implemented Interfaces:
  `Iterator<T>`, `ListIterator<T>`

Direct Known Subclasses:
  `ReverseListIterator`

public abstract class FilterListIterator<T> extends Object implements ListIterator<T>
An `ListIterator` that retrieves its elements from a delegate `ListIterator`. The default implementation simply passes all method invocations to the delegate.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final ListIterator<T>`
`delegate`

## Constructor Summary

Constructors
Constructor
Description
`FilterListIterator(ListIterator<T> delegate)`

## Method Summary

Modifier and Type
Method
Description
`void`
`add(T o)`
Calls `delegate`.`ListIterator.add(java.lang.Object)`
`boolean`
`hasNext()`
Calls `delegate`.`ListIterator.hasNext()`
`boolean`
`hasPrevious()`
Calls `delegate`.`ListIterator.hasPrevious()`
`T`
`next()`
Calls `delegate`.`ListIterator.next()`
`int`
`nextIndex()`
Calls `delegate`.`ListIterator.nextIndex()`
`T`
`previous()`
Calls `delegate`.`ListIterator.previous()`
`int`
`previousIndex()`
Calls `delegate`.`ListIterator.previousIndex()`
`void`
`remove()`
Calls `delegate`.`ListIterator.remove()`
`void`
`set(T o)`
Calls `delegate`.`ListIterator.set(java.lang.Object)`

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

## Field Details

### delegate

protected final ListIterator<T> delegate

See Also:
  - `FilterListIterator`

## Constructor Details

### FilterListIterator

public FilterListIterator(ListIterator<T> delegate)

## Method Details

### hasNext

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

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

### next

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

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

### hasPrevious

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

Specified by:
  `hasPrevious` in interface `ListIterator<T>`

### previous

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

Specified by:
  `previous` in interface `ListIterator<T>`

### nextIndex

public int nextIndex()
Calls `delegate`.`ListIterator.nextIndex()`

Specified by:
  `nextIndex` in interface `ListIterator<T>`

### previousIndex

public int previousIndex()
Calls `delegate`.`ListIterator.previousIndex()`

Specified by:
  `previousIndex` in interface `ListIterator<T>`

### remove

public void remove()
Calls `delegate`.`ListIterator.remove()`

Specified by:
  `remove` in interface `Iterator<T>`
Specified by:
  `remove` in interface `ListIterator<T>`

### set

public void set(@Nullable T o)
Calls `delegate`.`ListIterator.set(java.lang.Object)`

Specified by:
  `set` in interface `ListIterator<T>`

### add

public void add(@Nullable T o)
Calls `delegate`.`ListIterator.add(java.lang.Object)`

Specified by:
  `add` in interface `ListIterator<T>`