public Object getValueAt(int rowIndex, int columnIndex) { Task<T> task = getValueAt(rowIndex); if (task == null) { return null; } switch (columnIndex) { case ID_INDEX: return task.getId(); case NAME_INDEX: return task.getName(); case PROGRESS_INDEX: return task.getProgress(); } return null; }
public int compare(Task<T> task1, Task<T> task2) { return (int) (task1.getId() - task2.getId()); }