Import std.collections.sorted
SortedSet
class
@DebugElements Public Class SortedSet<T: Comparable> Implements Iterable<T>, Cloneable, Defaultable, Equatable
Values without repeats, in order, which a SortedMap holds as its keys.
Examples
Local words = SortedSet<String>()
For word In ["pear", "apple", "fig", "apple"]
words.Add(word)
End For
Expect(words.ToArray() == ["apple", "fig", "pear"])
Expect(words.First() == "apple" && words.Ceiling("b") == "fig")std/collections/sorted.fb, line 569
-
A new, empty SortedSet.
-
How many values it holds.
-
Adds the
value, and tells whether it's new. A value that isn't equal to itself, like NaN, panics. -
Removes the
value, and tells whether it was there. -
Whether it holds
value. -
Takes every value out.
-
The smallest value, or Null when there's none.
-
The largest value, or Null when there's none.
-
The largest
valuethat isn't abovevalue, or Null when there's none. -
The smallest
valuethat isn't belowvalue, or Null when there's none. -
The values from
lowup tohigh, withouthighitself, in order, in a new array. -
The values, in order, in a new array.
-
A new, empty SortedSet.
-
A new SortedSet with the same values.
-
Two SortedSets are equal when they have the same values.
-
The values, in order. Adding or removing one while going over them panics.
Report an issue with this page or with FutureBlitz on GitHub.