linearSearch
Returns the insertion index for the given EventIdentifier. The insertion index can be seen as the index at which the cursor should be moved when inserting an event with the given sequence number and site identifier that would preserve the sorted behavior of the buffer.
Return
the insertion index, between 0
and MutableEventIdentifierGapBuffer.size
See also
a binary search equivalent
Parameters
the EventIdentifier we would insert.
Returns the insertion index for the given Int. The insertion index can be seen as the index at which the cursor should be moved when inserting an event with the given sequence number and site identifier that would preserve the sorted behavior of the buffer.
Return
the insertion index, between 0
and MutableIntGapBuffer.size
See also
a binary search equivalent
Parameters
the Int we would insert.