public static Collector<AddressRange, AddressSet, AddressSet> toAddressSet() {
		return new Collector<>() {
			@Override
			public Supplier<AddressSet> supplier() {
				return AddressSet::new;
			}

			@Override
			public BiConsumer<AddressSet, AddressRange> accumulator() {
				return AddressSet::add;
			}

			@Override
			public BinaryOperator<AddressSet> combiner() {
				return (s1, s2) -> {
					s1.add(s2);
					return s1;
				};
			}

			@Override
			public Function<AddressSet, AddressSet> finisher() {
				return Function.identity();
			}

			@Override
			public Set<Characteristics> characteristics() {
				return Set.of();
			}
		};
	}
Union a stream of address ranges into a single mutable address set

@return the address set
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/address/AddressCollectors.java