code: public static <K, V> Stream<Map.Entry<K, V>> accumulateEntries(Stream<Map.Entry<K, V>> stream, BinaryOperator<V> operator) {
  
          Objects.requireNonNull(stream);
          Objects.requireNonNull(operator);
  
          AccumulatingEntriesSpliterator<K, V> spliterator = AccumulatingEntriesSpliterator.of(stream.spliterator(), operator);
          return StreamSupport.stream(spliterator, stream.isParallel()).onClose(stream::close);
      }
docs: <p>Generates a stream composed of the accumulation of its elements, through the use of the provided binary
  operator. </p>
  <p>For the stream {@code Stream.of(1, 1, 1, 1)}, and the {@code Integer::sum} operator,
  the following stream is returned: {@code Stream.of(1, 2, 3, 4)}</p>
  <p>For the stream {@code Stream.of(1, 2, 5, 3)}, and the {@code Integer::max} operator,
  the following stream is returned: {@code Stream.of(1, 2, 5, 5)}</p>
  <p>A <code>NullPointerException</code> will be thrown if the provided stream or the operator is null. </p>
  <p>A <code>IllegalArgumentException</code> will be thrown if the provided stream is not ordered. </p>
  
  @param stream   the processed stream of entries
  @param operator the binary operator used to accumulate the values of the stream
  @param <K>      the type of the keys of the provided stream
  @param <V>      the type of the values provided stream
  @return the accumulated stream