protected int findRowItem(Comparator<RowItem> comparator,RowItem item){
  int row=lookupRowItem(comparator,item);
  if (row < table.getRowCount() && comparator.compare(item,getRowItem(row)) == 0) {
    return row;
  }
  return -1;
}

protected int findRowItem ( Comparator < RowItem > comparator , RowItem item ) { int row = lookupRowItem ( comparator , item ) ; if ( row < table . getRowCount ( ) && comparator . compare ( item , getRowItem ( row ) ) == 0 ) { return row ; } return - 1 ; }
finds an item in the table .
