public static <T> Set<T> asSet(Iterator<T> it) {
		Set<T> set = new HashSet<>();
		if (it == null) {
			return set;
		}

		while (it.hasNext()) {
			T t = it.next();
			set.add(t);
		}
		return set;
	}
Drains the given iterator into a new Set

@param it the iterator
@return the set
Ghidra/Framework/Generic/src/main/java/util/CollectionUtils.java