ImmutableOrderedSet<V> constructor
ImmutableOrderedSet<V> ([
- Iterable<
V> ? items
Creates an immutable ordered set with optional initial items.
items - The initial items to populate the set with. Defaults to an empty set.
Duplicates in the provided items will be automatically removed, keeping only the first occurrence.
The provided items will be made unmodifiable internally.
Implementation
ImmutableOrderedSet([final Iterable<V>? items])
: _items = (items?.toSet() ?? <V>{}).unmodifiable;