private boolean needsSorting() {
		if (doForceSort) {
			return true;
		}

		if (hasNewSort()) {
			return true;
		}

		if (tableSortDiffersFromSourceData()) {
			// The source of the data we are manipulating is sorted in a way that may be different
			// from the sort state of the table.  In that case, we have to sort the data we are
			// creating to match the table and not the source data--the table is always the truth
			// keeper of the correct sort.
			newSortContext = model.getSortingContext();
			return true;
		}

		return false;
	}
Returns true if the data needs to be sorted.
@return true if the data needs to be sorted.
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/TableUpdateJob.java