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
are compared using the
compare method in the methods mentioned above.
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
other is E.
SplayTreeSet( [int Function(E key1, E key2)? compare, bool Function(dynamic potentialKey)? isValidKey]) : _compare = compare ?? _defaultCompare<E>(), _validKey = isValidKey ?? ((dynamic v) => v is E);