question: private int lookupRowItem ( Comparator < RowItem > comparator , RowItem item ) { int left = 1 ; int right = table . getRowCount ( ) - 1 ; while ( left <= right ) { int middle = ( left + right ) > > > 1 ; RowItem i = getRowItem ( middle ) ; int cmp = comparator . compare ( i , item ) ; if ( cmp < 0 ) { left = middle + 1 ; } else if ( cmp > 0 ) { right = middle - 1 ; } else { return middle ; } } return left ; }
target:  Makes a binary search for the given row item over the table.