/Dart 2

Set<E>.of constructor

Set<E>.of(Iterable<E> elements)

Creates a Set from elements.

The created Set is a LinkedHashSet. As such, it considers elements that are equal (using operator ==) to be indistinguishable, and requires them to have a compatible Object.hashCode implementation.

The set is equivalent to one created by new LinkedHashSet<E>.of(elements).


factory Set.of(Iterable<E> elements) = LinkedHashSet<E>.of;

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.