| java.lang.Object net.sf.jga.algorithms.Unique net.sf.jga.util.UniqueIterator
UniqueIterator | public class UniqueIterator extends Unique.UniqueIterator implements Iterable<T>(Code) | | Iterator that will not return the same element twice in succession.
Note -- in addition to this class being deprecated in order to be moved,
its implementation of Iterable is also deprecated: the successor class
will not implement Iterable.
Copyright © 2003-2005 David A. Hall
|
UniqueIterator | public UniqueIterator(Iterator<? extends T> base)(Code) | | Builds a UniqueIterator for the given base iterator, using a test based
on the equals() method of type T.
|
UniqueIterator | public UniqueIterator(Iterator<? extends T> base, Comparator<? super T> comp)(Code) | | Builds a UniqueIterator for the given base iterator that uses the given
comparator to compare adjacent elements
throws: IllegalArgumentException - if either argument is null |
UniqueIterator | public UniqueIterator(Iterator<? extends T> base, BinaryFunctor<T, T, Boolean> eq)(Code) | | Builds a UniqueIterator for the given base iterator that uses the given
predicate to compare adjacent elements. The predicate should return true
if the adjacent elements are the same.
throws: IllegalArgumentException - if either argument is null |
Methods inherited from net.sf.jga.algorithms.Unique | public static Iterable<T> unique(T[] ts)(Code)(Java Doc) public static Iterable<T> unique(T[] ts, Comparator<? super T> comp)(Code)(Java Doc) public static Iterable<T> unique(T[] ts, BinaryFunctor<T, T, Boolean> eq)(Code)(Java Doc) public static Iterable<T> unique(Iterable<? extends T> i)(Code)(Java Doc) public static Iterable<T> unique(Iterable<? extends T> i, Comparator<? super T> comp)(Code)(Java Doc) public static Iterable<T> unique(Iterable<? extends T> i, BinaryFunctor<T, T, Boolean> eq)(Code)(Java Doc) public static Iterator<T> unique(Iterator<? extends T> iterator)(Code)(Java Doc) public static Iterator<T> unique(Iterator<? extends T> iterator, Comparator<? super T> comp)(Code)(Java Doc) public static Iterator<T> unique(Iterator<? extends T> iterator, BinaryFunctor<T, T, Boolean> eq)(Code)(Java Doc) public static TCollection unique(Iterable<? extends T> lin, TCollection cout)(Code)(Java Doc) public static TCollection unique(Iterable<? extends T> lin, Comparator<? super T> comp, TCollection cout)(Code)(Java Doc) public static TCollection unique(Iterable<? extends T> lin, BinaryFunctor<T, T, Boolean> eq, TCollection cout)(Code)(Java Doc)
|
|
|