@Override
	protected Comparator<BatchGroup> createSortComparator(int columnIndex) {
		Comparator<BatchGroup> comp = super.createSortComparator(columnIndex);
		if (COLS.getCol(columnIndex) == COLS.SELECTED) {
			// Special case column 0 (selected) to be reversed, and secondarily sorted on filecount.
			return comp.reversed().thenComparing((bg1, bg2) -> {
				return bg2.size() - bg1.size();
			});
		}
		return comp;
	}
An adapter between {@link BatchInfo} and a {@link TableModel}.
Ghidra/Features/Base/src/main/java/ghidra/plugins/importer/batch/BatchImportTableModel.java