public MapStream<K, V> sortedByKey(Comparator<K> comparator) {
        inner = inner.sorted(byKeyOnly(requireNonNull(comparator)));
        return this;
    }
Returns a stream consisting of the elements of this stream, sorted
according to the provided {@code Comparator} applied to the keys of the
entries.
<p>
For ordered streams, the sort is stable. For unordered streams, no
stability guarantees are made.
<p>
This is a stateful intermediate operation.

@param comparator  a non-interfering, stateless {@code Comparator} to be 
                   used to compare entity keys
@return            the new stream
@throws NullPointerException if any of the provided parameters are {@code null}
common-parent/mapstream/src/main/java/com/speedment/common/mapstream/MapStream.java