Create a new SplayTreeSet with the given compare function.
compare function is omitted, it defaults to Comparable.compare, and the elements must be comparable.
compare function may not work on all objects. It may not even work on all
For operations that add elements to the set, the user is supposed to not pass in objects that doesn't work with the compare function.
isValidKey is provided, only values satisfying
isValidKey(other) are compared using the
compare method in the methods mentioned above. If the
isValidKey function returns false for an object, it is assumed to not be in the set.
If omitted, the
isValidKey function defaults to checking against the type parameter:
other is E.
SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)]) : _comparator = compare ?? _defaultCompare<E>(), _validKey = isValidKey ?? ((v) => v is E);
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.