@SuppressWarnings("unchecked")
	public static <T> Stream<T> merge(Collection<? extends Stream<? extends T>> streams,
			Comparator<? super T> comparator) {
		if (streams.size() == 1) {
			return (Stream<T>) streams.iterator().next();
		}
		return StreamSupport.stream(new MergeSortingSpliterator<>(
			streams.stream().map(s -> s.spliterator()).toList(), comparator), false);
	}
Union two sorted streams into a single sorted stream

@param <T> the type of elements
@param streams the streams to be merged
@param comparator the comparator that orders each stream and that will order the resulting
           stream
@return the sorted stream
Ghidra/Debug/ProposedUtils/src/main/java/ghidra/util/StreamUtils.java