public static TableSortState restoreFromXML(Element element) {
		List<?> tableSortStateElementList = element.getChildren(XML_TABLE_SORT_STATE);
		if (tableSortStateElementList == null || tableSortStateElementList.size() == 0) {
			return null; // the given element contains no sort state data
		}

		Element sortStateElement = (Element) tableSortStateElementList.get(0);
		List<?> children = sortStateElement.getChildren(ColumnSortState.XML_COLUMN_SORT_STATE);

		List<ColumnSortState> columnStates = new ArrayList<>(children.size());
		for (Object object : children) {
			columnStates.add(ColumnSortState.restoreFromXML((Element) object));
		}

		return new TableSortState(columnStates);
	}
Creates a sort state with the given column as the sorted column in the given direction.

@param columnModelIndex The column to sort
@param isAscending True to sort ascending; false to sort descending
@return a sort state with the given column as the sorted column (sorted ascending).
@see TableSortStateEditor
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/TableSortState.java