ImmortalSet<T> constructor
ImmortalSet<T> ([
- Iterable<
T> iterable = const []
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
ImmortalSet([Iterable<T> iterable = const []]) : _set = Set<T>.from(iterable);