@Override
	public void setTableSortState(TableSortState newSortState) {

		if (!isValidSortState(newSortState)) {
			// if the user calls this method with an invalid value, then let them know!
			throw new IllegalArgumentException(
				"Unable to sort the table by the given sort state!: " + newSortState);
		}

		doSetTableSortState(newSortState);
	}
Returns the index of the given row object in this model; a negative value if the model
does not contain the given object.

<p>Warning: if the this model has no sort applied, then performance will be O(n).  If
sorted, then performance is O(log n).  You can call {@link #isSorted()} to know when
this will happen.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/AbstractSortedTableModel.java