binarySearchBySite

fun MutableEventIdentifierGapBuffer.binarySearchBySite(    element: SiteIdentifier,     fromIndex: Int = 0,     toIndex: Int = size): Int

Searches this MutableEventIdentifierGapBuffer for the provided element using the binary search algorithm. The array is expected to be sorted by site identifiers, otherwise the result is undefined.

If the list contains multiple elements with a site equal to the specified element, there is no guarantee which one will be found.

The implementation is adapted from List.binarySearch.

Return

the index of the element with the given site identifier, if it is contained in the array within the specified range; otherwise the inverted insertion point (-insertion point - 1).