code: public static Set<Integer> convertRowIndicesToModel(
          JTable table, Iterable<? extends Integer> viewRows)
      {
          Set<Integer> modelRows = new LinkedHashSet<Integer>();
          for (Integer viewRow : viewRows)
          {
              int modelRow = table.convertRowIndexToModel(viewRow);
              modelRows.add(modelRow);
          }
          return modelRows;
      }
docs: Convert all of the given view row indices to model row indices
  for the given table
  
  @param table The table
  @param viewRows The view row indices
  @return The model row indices