protected AssemblyResolutionResults apply(AbstractAssemblyResolutionFactory<?, ?> factory,
			Function<AssemblyResolvedPatterns, AssemblyResolution> function) {
		return stream().map(res -> {
			if (res instanceof AssemblyResolvedBackfill) {
				throw new AssertionError();
			}
			if (res instanceof AssemblyResolvedError err) {
				return err;
			}
			if (res instanceof AssemblyResolvedPatterns rp) {
				return function.apply(rp);
			}
			throw new AssertionError();
		}).collect(Collectors.toCollection(factory::newAssemblyResolutionResults));
	}
Get an unmodifiable reference to this set

@return the set
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/app/plugin/assembler/sleigh/sem/AssemblyResolutionResults.java