code: public Map<K, V> toImmutableMap() {
          Map<K, V> map = toMap();
          return map.isEmpty() ? Collections.emptyMap() : Collections.unmodifiableMap(map);
      }
docs: Returns an immutable {@link Map} containing the elements of this stream.
  There's no guarantees on exact type of the returned {@code Map}. In
  particular, no specific element order in the resulting {@code Map} is
  guaranteed. The returned {@code Map} is guaranteed to be serializable if
  all its elements are serializable.
  
  <p>
  This is a terminal operation.
  
  @return a {@code Map} containing the elements of this stream
  @throws IllegalStateException if this stream contains duplicate keys
  (according to {@link Object#equals(Object)})
  @see #toMap()
  @since 0.6.3