code: public static <K, V> Stream<Entry<K, V>> sortedStream(Map<K, V> map,
              Comparator<? super Entry<K, V>> comparator) {
          return buildEntryStream(map).sorted(comparator);
      }
docs: Sorted stream stream.
  
  @param <K>        the type parameter
  @param <V>        the type parameter
  @param map        the map
  @param comparator the comparator
  @return the stream