ImmortalSet<T>.ofIterable constructor
ImmortalSet<T>.ofIterable (
- Iterable<
T> iterable
Creates an ImmortalSet that contains all elements of iterable
.
All the elements of iterable
should be instances of T
.
The iterable
itself can have any type.
It iterates over iterable
, which must therefore not change during the
iteration.
The set considers elements that are equal (using the ==
operator) to be
indistinguishable and requires them to have a compatible hashCode
implementation.
Implementation
factory ImmortalSet.ofIterable(Iterable<T> iterable) => ImmortalSet(iterable);