DefaultSortController extends DefaultRowSorter<M, Integer> implements
        SortController<M> { @Override public int convertRowIndexToModel(int viewIndex) { if ((viewIndex < 0) || viewIndex >= getViewRowCount()) throw new IndexOutOfBoundsException("valid viewIndex: 0 <= index < " + getViewRowCount() + " but was: " + viewIndex); try { return super.convertRowIndexToModel(viewIndex); } catch (Exception e) { } return viewIndex; } DefaultSortController(); @Override void setSortable(boolean sortable); @Override boolean isSortable(); @Override void setSortable(int column, boolean sortable); @Override boolean isSortable(int column); @Override void toggleSortOrder(int column); @Override void setSortOrder(int column, SortOrder sortOrder); @Override SortOrder getSortOrder(int column); @Override void resetSortOrders(); @Override SortOrder[] getSortOrderCycle(); @Override void setSortOrderCycle(SortOrder... cycle); @Override void setStringValueProvider(StringValueProvider registry); @Override StringValueProvider getStringValueProvider(); static SortOrder[] getDefaultSortOrderCycle(); @Override int convertRowIndexToModel(int viewIndex); @Override int convertRowIndexToView(int modelIndex); @Override int getModelRowCount(); @Override int getViewRowCount(); @Override void allRowsChanged(); @Override void modelStructureChanged(); @Override void rowsDeleted(int firstRow, int endRow); @Override void rowsInserted(int firstRow, int endRow); @SuppressWarnings({ "unchecked", "rawtypes" })
    static final Comparator COMPARABLE_COMPARATOR; }
@Test public void testToModelAfterSilentRemoveNotSorted() { model.removeRow(rows - 1); assertEquals(rows - 1, sorter.convertRowIndexToModel(rows - 1)); }
@Test (expected = IndexOutOfBoundsException.class) public void testToModelAfterSilentInsertNotSorted() { model.addRow(new Object[] {rows}); sorter.convertRowIndexToModel(rows); }