code: public static <T> Collector<T, ?, Optional<Long>> rank(T value, Comparator<? super T> comparator) {
          return rankBy(value, t -> t, comparator);
      }
docs: Get a {@link Collector} that calculates the <code>RANK()</code> function given a specific ordering.