| net.sf.jga.fn.algorithm.Merge
Merge | public class Merge extends BinaryFunctor,Iterator extends T>,MergeIterator> (Code) | | Returns an iterator based on the two input iterators that will merge their
contents. If the contents of both input iterators are sorted, then the
iterator returned will be sorted as well.
To serialize a Merge, the comparator passed at construction must be
Serializable.
Copyright © 2003-2005 David A. Hall
|
Constructor Summary | |
public | Merge(Comparator<T> comp) Builds an Merge functor that will use the given comparator to compare
corresponding elements of two input iterators.. |
serialVersionUID | final static long serialVersionUID(Code) | | |
Merge | public Merge(Comparator<T> comp)(Code) | | Builds an Merge functor that will use the given comparator to compare
corresponding elements of two input iterators..
throws: IllegalArgumentException - if the test is null |
accept | public void accept(net.sf.jga.fn.Visitor v)(Code) | | Calls the Visitor's visit(Merge) method, if it
implements the nested Visitor interface.
|
fn | public MergeIterator<T> fn(Iterator<? extends T> iter1, Iterator<? extends T> iter2)(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 |
getComparator | public Comparator<T> getComparator()(Code) | | Returns the functor used to process elements in an iteration.
|
|
|