SortedListExtension<E> extension
Methods
-
bisectLeft(E item, {Comparator<E>? compare, int low = 0, int? high})
→ int
-
Assuming the list is sorted, locate the insertion point for
item
in a to maintain sorted order.
-
bisectRight(E item, {Comparator<E>? compare, int low = 0, int? high})
→ int
-
Similar to bisectLeft, but returns an insertion point which comes after (to the right of)
any existing entries of
item
in the list.
-
bsearch(E x, {Comparator<E>? compare, int low = 0, int? high})
→ int
-
Assuming the list is sorted, locate the leftmost element exactly equal to
x
.
-
bsearchGreaterThan(E x, {Comparator<E>? compare})
→ int
-
Assuming the list is sorted, locate leftmost element greater than
x
.
-
bsearchGreaterThanOrEqualTo(E x, {Comparator<E>? compare})
→ int
-
Assuming the list is sorted, locate leftmost item greater than or equal to
x
.
-
bsearchLessThan(E x, {Comparator<E>? compare})
→ int
-
Assuming the list is sorted, locate rightmost element less than
x
.
-
bsearchLessThanOrEqualTo(E x, {Comparator<E>? compare})
→ int
-
Assuming the list is sorted, locate rightmost element less than or equal to
x
.
-
insortLeft(E item, {Comparator<E>? compare, int low = 0, int? high})
→ void
-
Assuming the list is sorted, insert
item
in list in sorted order.
-
insortRight(E item, {Comparator<E>? compare, int low = 0, int? high})
→ void
-
Similar to insortLeft, but inserting
item
in list after any existing entries of item
.