| net.sf.jga.fn.algorithm.Unique
Unique | public class Unique extends UnaryFunctor,UniqueIterator> (Code) | | Returns an iterator based on the input iterator that will not yield the
same value twice in succession.
Copyright © 2003-2005 David A. Hall
author: David A. Hall |
Constructor Summary | |
public | Unique() Builds an Unique functor that will use EqualTo to compare successive
elements. | public | Unique(BinaryFunctor<T, T, Boolean> test) Builds an Unique functor that will use the given functor to compare
successive elements. |
serialVersionUID | final static long serialVersionUID(Code) | | |
Unique | public Unique()(Code) | | Builds an Unique functor that will use EqualTo to compare successive
elements.
throws: IllegalArgumentException - if the test is null |
Unique | public Unique(BinaryFunctor<T, T, Boolean> test)(Code) | | Builds an Unique functor that will use the given functor to compare
successive elements. The functor is required to return TRUE when its
arguments are the same.
throws: IllegalArgumentException - if the test is null |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(Unique) method, if it
implements the nested Visitor interface.
|
fn | public UniqueIterator<T> fn(Iterator<? extends T> iterator)(Code) | | Apply the functor to each element in the iteration and return an iterator
over the results
an iterator over the results of the transformation |
|
|