public void insert(ROW_OBJECT value) {

		if (source != null) {
			// always update the master data
			source.insert(value);
		}

		if (!passesFilter(value)) {
			return; // this item is filtered out of this data
		}

		if (!isSorted()) {
			// Not yet sorted or intentionally unsorted; just add the item, it will get sorted later
			data.add(value);
			return;
		}

		Comparator<ROW_OBJECT> comparator = sortContext.getComparator();
		int index = Collections.binarySearch(data, value, comparator);
		if (index < 0) {
			// not yet in the collection--add it
			index = -index - 1;
			data.add(index, value);
			return;
		}

		// The search thinks the item is in the list because a compareTo() result of 0 was 
		// found.  If the two objects are not equal(), then add the new value.
		ROW_OBJECT existingValue = data.get(index);
		if (!Objects.equals(value, existingValue)) {
			data.add(index, value);
		}
	}
Adds the new {@code value} to the data at the appropriate location based on the sort

@param value the row Object to insert
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/threaded/TableData.java