@Override
    public <R, A> R collect(Collector<? super Map.Entry<K, V>, A, R> collector) {
        return inner.collect(requireNonNull(collector));
    }
Performs a mutable reduction operation on the elements of this stream 
using a {@code Collector}. A {@code Collector} encapsulates the functions 
used as arguments to {@link #collect(Supplier, BiConsumer, BiConsumer)}, 
allowing for reuse of collection strategies and composition of collect 
operations such as multiple-level grouping or partitioning.
<p>
If the stream is parallel, and the {@code Collector} is 
{@link Collector.Characteristics#CONCURRENT concurrent}, and either the 
stream is unordered or the collector is
{@link Collector.Characteristics#UNORDERED unordered},
then a concurrent reduction will be performed (see {@link Collector} for
details on concurrent reduction.)
<p>
This is a terminal operation.
<p>
When executed in parallel, multiple intermediate results may be
instantiated, populated, and merged so as to maintain isolation of
mutable data structures.  Therefore, even when executed in parallel
with non-thread-safe data structures (such as {@code ArrayList}), no
additional synchronization is needed for a parallel reduction.

<p>
The following will accumulate strings into an ArrayList:
<pre>{@code
    List<String> asList = stringStream.collect(Collectors.toList());
}</pre>
<p>
The following will classify {@code Person} objects by city:
<pre>{@code
    Map<String, List<Person>> peopleByCity
        = personStream.collect(Collectors.groupingBy(Person::getCity));
}</pre>
<p>
The following will classify {@code Person} objects by state and city,
cascading two {@code Collector}s together:
<pre>{@code
    Map<String, Map<String, List<Person>>> peopleByStateAndCity
        = personStream.collect(Collectors.groupingBy(Person::getState,
                                                     Collectors.groupingBy(Person::getCity)));
}</pre>

@param <R>        the type of the result
@param <A>        the intermediate accumulation type of the 
                  {@code Collector}
@param collector  the {@code Collector} describing the reduction
@return           the result of the reduction
@throws NullPointerException if any of the provided parameters are {@code null}

@see #collect(Supplier, BiConsumer, BiConsumer)
@see Collectors
common-parent/mapstream/src/main/java/com/speedment/common/mapstream/MapStream.java