private boolean isValidSortState(TableSortState tableSortState) {
		int columnCount = getColumnCount();
		int sortedColumnCount = tableSortState.getSortedColumnCount();
		if (sortedColumnCount > columnCount) {
			return false; // more columns than we have
		}

		// verify the requested columns are sortable
		for (ColumnSortState state : tableSortState) {

			int index = state.getColumnModelIndex();
			if (!isSortable(index)) {
				return false; // the state wants to sort on an unsortable column
			}

			if (index >= columnCount) {
				return false; // requested a column that is larger than the number of columns
			}
		}

		return true;
	}
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