private Comparator<T> createLastResortComparator(ComparatorLink parentChain) {
		Comparator<T> endOfChain = new EndOfChainComparator();

		//
		// 						Unusual Code Alert!
		// This is hard to explain, but here goes: there is a special case where we have only
		// one column sorted and that column is 'reversed', then to provide consistent sorting,
		// and later searching, we need to reverse the tie-breaker comparator.  Without this,
		// the tie-breaker always produces the same results, regardless of which direction the
		// search is going.  That will break any clients that call Collections.reverse() in
		// order to quickly invert an existing sort.
		//
		if (parentChain.primaryComparator instanceof AbstractSortedTableModel.ReverseComparator) {
			endOfChain = new ReverseComparator(endOfChain);
		}

		return endOfChain;
	}
An extension point for subclasses to insert their own comparator objects for their data.
Subclasses can create comparators for a single or multiple columns, as desired.

@param columnIndex the column index
@return the comparator
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/AbstractSortedTableModel.java