Class LazyDistinctIterable<T>
java.lang.Object
de.renebergelt.quiterables.iterators.LazyDistinctIterable<T>
- Type Parameters:
T- Type of the elements in this Iterable
- All Implemented Interfaces:
Iterable<T>
Iterable which returns the elements of a source iterable
but filters duplicates either by using the equals() method of
the objects or a custom equality comparer
- Author:
- René Bergelt
-
Constructor Summary
ConstructorsConstructorDescriptionLazyDistinctIterable(Iterable<T> _wrapped)Create a new lazy distinct iterable which wraps the given iterableLazyDistinctIterable(Iterable<T> _wrapped, Equivalence<T> _equalityComparer)Create a new lazy distinct iterable which wraps the given iterable using teh given equality comparer -
Method Summary
Methods 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
-
LazyDistinctIterable
Create a new lazy distinct iterable which wraps the given iterable- Parameters:
_wrapped- The wrapped iterable
-
LazyDistinctIterable
Create a new lazy distinct iterable which wraps the given iterable using teh given equality comparer- Parameters:
_wrapped- The wrapped iterable_equalityComparer- Comparer to decide if two elements are equal
-
-
Method Details