Package org.dmfs.jems2.iterator
Class Distinct<T>
java.lang.Object
org.dmfs.jems2.iterator.BaseIterator<E>
org.dmfs.jems2.iterator.DelegatingIterator<T>
org.dmfs.jems2.iterator.Distinct<T>
- All Implemented Interfaces:
Iterator<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.iterator.DelegatingIterator
hasNext, nextMethods inherited from class org.dmfs.jems2.iterator.BaseIterator
equals, hashCode, removeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
Distinct
-
Distinct
-