@Override
	protected int getIndexForRowObject(T rowObject, List<T> data) {
		if (isSorted()) {
			Comparator<T> comparator = getComparatorChain(sortState);
			return Collections.binarySearch(data, rowObject, comparator);
		}

		for (int i = 0; i < data.size(); i++) {
			T t = data.get(i);
			if (rowObject.equals(t)) {
				return i;
			}
		}
		return -1;
	}
Returns the index for the given object in the given list

@param rowObject the item
@param data the data
@return the index
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/AbstractSortedTableModel.java