title: How to return an unmodifiable map from Collectors.groupingBy in java?
body: <p>So I have a map that takes a Long as a key and a list as a value.
  I want both the map and the list in each entry to be unmodifiable.</p>
  <pre class="lang-java prettyprint-override"><code>Map&lt;Long, List&lt;VariantValueDto&gt;&gt; variantValues = productVariantValues.stream()
      .map(p -&gt; new VariantValueDto(
          p.getProductVariantId(), p.getOptionId(), p.getOptionName(), p.getOptionValueId(), p.getValueName()
      ))
      .collect(Collectors.groupingBy(VariantValueDto::getProductVariantId));
  </code></pre>
  <p>how to return such results?</p>