Package org.dmfs.jems2.iterable
Class Distinct<T>
- java.lang.Object
-
- org.dmfs.jems2.iterable.DelegatingIterable<T>
-
- org.dmfs.jems2.iterable.Distinct<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
public final class Distinct<T> extends DelegatingIterable<T>
AnIteratorwhich 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"]
-
-
Method Summary
-
Methods inherited from class org.dmfs.jems2.iterable.DelegatingIterable
iterator
-
-