code: public static Stream<LongSummaryStatistics> shiftingWindowSummarizingLong(LongStream longStream, int rollingFactor) {
          Objects.requireNonNull(longStream);
  
          RollingOfLongSpliterator ofLongSpliterator = RollingOfLongSpliterator.of(longStream.spliterator(), rollingFactor);
  
          return StreamSupport.stream(ofLongSpliterator, longStream.isParallel())
                  .onClose(longStream::close)
                  .map(
                          str -> str.collect(
                                  LongSummaryStatistics::new,
                                  (longSummaryStatistics, value) -> longSummaryStatistics.accept(value),
                                  LongSummaryStatistics::combine
                          )
                  );
      }
docs: <p>Generates a stream that is computed from a provided long stream by first rolling it in the same
  way as the <code>roll()</code> method does. Then a summarizing long operation is applied on each
  substream to form the final long summary stream. No boxing / unboxing is conducted in the process.
  <p>The resulting stream has the same number of elements as the provided stream,
  minus the size of the window width, to preserve consistency of each collection. </p>
  <p>A <code>NullPointerException</code> will be thrown if the provided stream is null.</p>
  
  @param longStream    the processed stream
  @param rollingFactor the size of the window to apply the collector on
  @return a stream in which each value is the collection of the provided stream