code: public static <T> Collector<T, ?, Optional<T>> median(Comparator<? super T> comparator) {
          return percentile(0.5, comparator);
      }
docs: Get a {@link Collector} that calculates the <code>MEDIAN()</code> function given a specific ordering.