code: public <R> R toMapAndThen(Function<? super Map<K, V>, R> finisher) {
          if (context.fjp != null)
              return context.terminate(() -> finisher.apply(toMap()));
          return finisher.apply(toMap());
      }
docs: Creates a {@link Map} containing the elements of this stream, then
  performs finishing transformation and returns its result. There are no
  guarantees on the type or serializability of the {@code Map} created.
  
  <p>
  This is a <a href="package-summary.html#StreamOps">terminal</a>
  operation.
  
  <p>
  Created {@code Map} is guaranteed to be modifiable.
  
  <p>
  For parallel stream the concurrent {@code Map} is created.
  
  @param <R> the type of the result
  @param finisher a function to be applied to the intermediate map
  @return result of applying the finisher transformation to the {@code Map}
  of the stream elements.
  @throws IllegalStateException if this stream contains duplicate keys
  (according to {@link Object#equals(Object)})
  @see #toMap()
  @since 0.5.5