org.apache.commons.collections.iterators
Class UniqueFilterIterator

java.lang.Object
  extended by org.apache.commons.collections.iterators.FilterIterator
      extended by org.apache.commons.collections.iterators.UniqueFilterIterator
All Implemented Interfaces:
java.util.Iterator

public class UniqueFilterIterator
extends FilterIterator

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:
Commons Collections 2.1
Version:
$Revision: 646777 $ $Date: 2008-04-10 13:33:15 +0100 (Thu, 10 Apr 2008) $
Author:
Morgan Delagrange

Constructor Summary
UniqueFilterIterator(java.util.Iterator iterator)
          Constructs a new UniqueFilterIterator.
 
Method Summary
 
Methods inherited from class org.apache.commons.collections.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(java.util.Iterator iterator)
Constructs a new UniqueFilterIterator.

Parameters:
iterator - the iterator to use


Copyright © 2001-2008 The Apache Software Foundation. All Rights Reserved.