ListComparableExtensions<E extends Comparable<E>> extension

Various extensions on lists of comparable elements.

on

Methods

binarySearch(E element, [int compare(E, E)?]) int

Available on List<E>, provided by the ListComparableExtensions extension

Returns the index of element in this sorted list.
lowerBound(E element, [int compare(E, E)?]) int

Available on List<E>, provided by the ListComparableExtensions extension

Returns the index where element should be in this sorted list.
sortRange(int start, int end, [int compare(E a, E b)?]) → void

Available on List<E>, provided by the ListComparableExtensions extension

Sort a range of elements by compare.