|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.jga.algorithms.Unique
public class Unique
Algorithms that eliminate successive duplicate entries from a collection, iteration, or iterable resource.
Copyright © 2006 David A. Hall
Nested Class Summary | |
---|---|
static class |
Unique.UniqueIterable<T>
Produces iterators that will not return the same element twice in succession. |
static class |
Unique.UniqueIterator<T>
Iterator that will not return the same element twice in succession. |
Constructor Summary | |
---|---|
Unique()
|
Method Summary | ||
---|---|---|
static
|
unique(java.lang.Iterable<? extends T> i)
Returns the contents of the input, skipping duplicate entries. |
|
static
|
unique(java.lang.Iterable<? extends T> i,
BinaryFunctor<T,T,java.lang.Boolean> eq)
|
|
static
|
unique(java.lang.Iterable<? extends T> lin,
BinaryFunctor<T,T,java.lang.Boolean> eq,
TCollection cout)
Appends the contents of the input (skipping duplicate entries as determined by the given predicate) to the output. |
|
static
|
unique(java.lang.Iterable<? extends T> i,
java.util.Comparator<? super T> comp)
|
|
static
|
unique(java.lang.Iterable<? extends T> lin,
java.util.Comparator<? super T> comp,
TCollection cout)
Appends the contents of the input (skipping duplicate entries as determined by the given comparator) to the output. |
|
static
|
unique(java.lang.Iterable<? extends T> lin,
TCollection cout)
Appends the contents of the input (skipping duplicate entries) to the output. |
|
static
|
unique(java.util.Iterator<? extends T> iterator)
Returns the contents of the iterator, skipping duplicate entries. |
|
static
|
unique(java.util.Iterator<? extends T> iterator,
BinaryFunctor<T,T,java.lang.Boolean> eq)
Returns the contents of the iterator, skipping duplicate entries as determined by the given predicate. |
|
static
|
unique(java.util.Iterator<? extends T> iterator,
java.util.Comparator<? super T> comp)
Returns the contents of the iterator, skipping duplicate entries as determined by the given comparator. |
|
static
|
unique(T[] ts)
Returns the elements of the array, skipping duplicate entries. |
|
static
|
unique(T[] ts,
BinaryFunctor<T,T,java.lang.Boolean> eq)
Returns the elements of the array, skipping duplicate entries as determined by the given predicate. |
|
static
|
unique(T[] ts,
java.util.Comparator<? super T> comp)
Returns the elements of the array, skipping duplicate entries as determined by the given comparator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Unique()
Method Detail |
---|
public static <T> java.lang.Iterable<T> unique(T[] ts)
public static <T> java.lang.Iterable<T> unique(T[] ts, java.util.Comparator<? super T> comp)
public static <T> java.lang.Iterable<T> unique(T[] ts, BinaryFunctor<T,T,java.lang.Boolean> eq)
public static <T> java.lang.Iterable<T> unique(java.lang.Iterable<? extends T> i)
public static <T> java.lang.Iterable<T> unique(java.lang.Iterable<? extends T> i, java.util.Comparator<? super T> comp)
public static <T> java.lang.Iterable<T> unique(java.lang.Iterable<? extends T> i, BinaryFunctor<T,T,java.lang.Boolean> eq)
public static <T> java.util.Iterator<T> unique(java.util.Iterator<? extends T> iterator)
public static <T> java.util.Iterator<T> unique(java.util.Iterator<? extends T> iterator, java.util.Comparator<? super T> comp)
public static <T> java.util.Iterator<T> unique(java.util.Iterator<? extends T> iterator, BinaryFunctor<T,T,java.lang.Boolean> eq)
public static <T,TCollection extends java.util.Collection<? super T>> TCollection unique(java.lang.Iterable<? extends T> lin, TCollection cout)
public static <T,TCollection extends java.util.Collection<? super T>> TCollection unique(java.lang.Iterable<? extends T> lin, java.util.Comparator<? super T> comp, TCollection cout)
public static <T,TCollection extends java.util.Collection<? super T>> TCollection unique(java.lang.Iterable<? extends T> lin, BinaryFunctor<T,T,java.lang.Boolean> eq, TCollection cout)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |