org.eclipse.net4j.util.collection

## Class PredicateIterator<T>

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

- All Implemented Interfaces:
    java.util.Iterator<T>

      public class PredicateIterator<T>
      extends AbstractFilteredIterator<T>

  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
    `PredicateIterator(java.util.Iterator<T> delegate, Predicate<? super T> predicate)`
    `PredicateIterator(Predicate<? super T> predicate, java.util.Iterator<T> delegate)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Predicate<? super T>` | `getPredicate()`
    `protected boolean` | `isValid(T element)`

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

      `computeNextElement`

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

    - #### PredicateIterator

          public PredicateIterator(java.util.Iterator<T> delegate,
                                   Predicate<? super T> predicate)

    - #### PredicateIterator

          public PredicateIterator(Predicate<? super T> predicate,
                                   java.util.Iterator<T> delegate)

      Since:
        3.4

  - ### Method Detail

    - #### getPredicate

          public Predicate<? super T> getPredicate()

    - #### isValid

          protected boolean isValid(T element)

      Specified by:
        `isValid` in class `AbstractFilteredIterator<T>`

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