|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.jga.algorithms.Unique.UniqueIterator<T>
public static class Unique.UniqueIterator<T>
Iterator that will not return the same element twice in succession.
| Constructor Summary | |
|---|---|
Unique.UniqueIterator(java.util.Iterator<? extends T> base)
Builds a UniqueIterator for the given base iterator, using a test based on the equals() method of type T. |
|
Unique.UniqueIterator(java.util.Iterator<? extends T> base,
BinaryFunctor<T,T,java.lang.Boolean> eq)
Builds a UniqueIterator for the given base iterator that uses the given predicate to compare adjacent elements. |
|
Unique.UniqueIterator(java.util.Iterator<? extends T> base,
java.util.Comparator<? super T> comp)
Builds a UniqueIterator for the given base iterator, using the given comparator. |
|
| Method Summary | |
|---|---|
boolean |
hasNext()
|
T |
next()
|
void |
remove()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Unique.UniqueIterator(java.util.Iterator<? extends T> base)
public Unique.UniqueIterator(java.util.Iterator<? extends T> base,
java.util.Comparator<? super T> comp)
public Unique.UniqueIterator(java.util.Iterator<? extends T> base,
BinaryFunctor<T,T,java.lang.Boolean> eq)
java.lang.IllegalArgumentException - if either argument is null| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator<T>public T next()
next in interface java.util.Iterator<T>public void remove()
remove in interface java.util.Iterator<T>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||