public final class Distinct<T> extends DelegatingIterable<T>
Iterator which drops duplicates of already iterated elements.
Examples
Distinct([1, 2, 2, 1, 2, 3, 3]) -> [1, 2, 3] Distinct(String::length, ["abc", "xyz", "42", "21"]) -> ["abc", "42"]
| Constructor and Description |
|---|
Distinct(Function<? super T,? extends V> criterionFunction,
java.lang.Iterable<T> delegate) |
Distinct(java.lang.Iterable<T> delegate) |
iterator