code: public static <E> Stream<E> filteringAllMax(Stream<E> stream, Comparator<? super E> comparator) {
  
          Objects.requireNonNull(stream);
          Objects.requireNonNull(comparator);
  
          FilteringAllMaxSpliterator<E> spliterator = FilteringAllMaxSpliterator.of(stream.spliterator(), comparator);
          return StreamSupport.stream(spliterator, stream.isParallel()).onClose(stream::close);
      }
docs: <p>Generates a stream only composed of the greatest elements of the provided stream, compared using the provided
  comparator. </p>
  <p>A <code>NullPointerException</code> will be thrown if the provided stream or the comparator is null. </p>
  
  @param stream     the processed stream
  @param comparator the comparator used to compare the elements of the stream
  @param <E>        the type of the provided stream
  @return a filtered stream