Creates a SplayTreeSet that contains all elements
.
The set works as if created by new SplayTreeSet<E>(compare, isValidKey)
.
All the elements
should be valid as arguments to the compare
function.
Source
factory SplayTreeSet.from(Iterable elements,
[int compare(E key1, E key2),
bool isValidKey(potentialKey)]) {
SplayTreeSet<E> result = new SplayTreeSet<E>(compare, isValidKey);
for (final E element in elements) {
result.add(element);
}
return result;
}