org.apache.commons.collections4.iterators

## Class UniqueFilterIterator<E>

- java.lang.Object
- - org.apache.commons.collections4.iterators.FilterIterator<E>
  - - org.apache.commons.collections4.iterators.UniqueFilterIterator<E>

- All Implemented Interfaces:
    Iterator<E>

      public class UniqueFilterIterator<E>
      extends FilterIterator<E>

  A FilterIterator which only returns "unique" Objects. Internally, the Iterator maintains a Set of objects it has already encountered, and duplicate Objects are skipped.
  Since:
    2.1
  Version:
    $Id: UniqueFilterIterator.java 1479385 2013-05-05 20:31:06Z tn $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UniqueFilterIterator(Iterator<? extends E> iterator)` Constructs a new `UniqueFilterIterator`.

  - ### Method Summary

    - ### Methods inherited from class org.apache.commons.collections4.iterators.FilterIterator

      `getIterator, getPredicate, hasNext, next, remove, setIterator, setPredicate`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UniqueFilterIterator

          public UniqueFilterIterator(Iterator<? extends E> iterator)

      Constructs a new `UniqueFilterIterator`.
      Parameters:
        `iterator` - the iterator to use

Copyright © 2001–2015 The Apache Software Foundation. All rights reserved.