Use Collectors.collectingAndThen to wrap the result of a stream computation in an unmodifiable set.