private static Collection<MemoryMatch> intersect(List<MemoryMatch> matches1,
			List<MemoryMatch> matches2) {

		List<MemoryMatch> intersection = new ArrayList<>();
		Map<Address, MemoryMatch> matches1Map = createMap(matches1);

		for (MemoryMatch match2 : matches2) {
			Address address = match2.getAddress();
			MemoryMatch match1 = matches1Map.get(address);
			if (match1 != null) {
				MemoryMatch best = match2.getLength() > match1.getLength() ? match2 : match1;
				intersection.add(best);
			}
		}
		return intersection;
	}
An enum of search results "combiners". Each combiner determines how to combine two sets of
memory search results. The current or existing results is represented as the "A" set and the
new search is represented as the "B" set.
Ghidra/Features/Base/src/main/java/ghidra/features/base/memsearch/combiner/Combiner.java