binarySearchExact

fun <T, D> binarySearchExact(target: T, list: ArrayList<D>, comparator: BinarySearchComparator<T, D>): Int

Perform a binary search for an item that matches exactly.

Parameters

target

The target value for the search.

list

The list of items to search within. The list must be sorted in ascending order.

comparator

The comparator function for performing the search.