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:
Iterable<T>
An
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 Summary
Constructors -
Method Summary
Methods inherited from class org.dmfs.jems2.iterable.DelegatingIterable
iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Distinct
-
Distinct
-