ListIdValuePairExtension<D extends Object, V> extension
Binary-search utilities for lists of (ID, value) pairs.
The list must be sorted by ID according to the provided comparator (or the default comparator) for correct results.
- on
-
- List<
(D, V)>
- List<
Methods
-
binarySearch(
D id, [ComputeIDCompare< D> ? compare]) → (D, V)? -
Available on List<
Returns the(D, V)> , provided by the ListIdValuePairExtension extension(ID, value)pair forid, ornullif not found. -
binarySearchIndex(
D id, [ComputeIDCompare< D> ? compare]) → int -
Available on List<
Returns the index of the entry with the given(D, V)> , provided by the ListIdValuePairExtension extensionid, or-1if not found.