org.eclipse.net4j.util.collection

## Class AbstractFilteredIterator<T>

- java.lang.Object
- - org.eclipse.net4j.util.collection.AbstractIterator<T>
  - - org.eclipse.net4j.util.collection.AbstractFilteredIterator<T>

- All Implemented Interfaces:
    java.util.Iterator<T>
  Direct Known Subclasses:
    LimitedIterator, PredicateIterator

      public abstract class AbstractFilteredIterator<T>
      extends AbstractIterator<T>

  An abstract base class for custom iterators that `filter` the elements of a delegate iterator.
  Since:
    3.3
  Author:
    Eike Stepper

- - ### Field Summary

    - ### Fields inherited from class org.eclipse.net4j.util.collection.AbstractIterator

      `END_OF_DATA`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFilteredIterator(java.util.Iterator<T> delegate)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Object` | `computeNextElement()` Returns the next iteration element, or `AbstractIterator.END_OF_DATA` if the end of the iteration has been reached.
    `protected abstract boolean` | `isValid(T element)`

    - ### Methods inherited from class org.eclipse.net4j.util.collection.AbstractIterator

      `empty, hasNext, next, remove`

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

    - #### AbstractFilteredIterator

          public AbstractFilteredIterator(java.util.Iterator<T> delegate)

  - ### Method Detail

    - #### computeNextElement

          protected java.lang.Object computeNextElement()

      Description copied from class: `AbstractIterator`
      Returns the next iteration element, or `AbstractIterator.END_OF_DATA` if the end of the iteration has been reached.
      Specified by:
        `computeNextElement` in class `AbstractIterator<T>`

    - #### isValid

          protected abstract boolean isValid(T element)

Copyright (c) 2014 Eike Stepper (Berlin, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html