@SuppressWarnings("unchecked") // the column provides the values itself; safe cast
	protected Comparator<Object> createSortComparatorForColumn(int columnIndex) {
		if (columnIndex < 0 || columnIndex >= tableColumns.size()) {
			// We have seen this sporadically.  Assume for now there is some sort of timing issue.
			// Although, it is possible for any client to call this on a table without columns.
			Msg.debug(this, "Invalid sort comparator request on %s at index %d (column count %d)"
					.formatted(getName(), columnIndex, tableColumns.size()));
			return null;
		}
		DynamicTableColumn<ROW_TYPE, ?, ?> column = getColumn(columnIndex);
		Comparator<Object> comparator =
			(Comparator<Object>) column.getComparator(this, columnIndex);
		return comparator;
	}
This differs from {@link #createSortComparator(int)} in that the other method creates a
comparator that operates on a full row value, whereas this method operates on column values.

@param columnIndex the column index
@return a comparator for the specific column values
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/GDynamicColumnTableModel.java