question: private int indexedBinarySearch ( List < S2CellId > l , S2CellId key , int low ) { int high = l . size ( ) - 1 ; while ( low <= high ) { int mid = ( low + high ) > > 1 ; S2CellId midVal = l . get ( mid ) ; int cmp = midVal . compareTo ( key ) ; if ( cmp < 0 ) { low = mid + 1 ; } else if ( cmp > 0 ) { high = mid - 1 ; } else { return mid ; } } return low ; }
target:  Just as normal binary search, except that it allows specifying the starting value for the lower bound.