guava/src/com/google/common/collect/MinMaxPriorityQueue.java
public static <B> Builder<B> orderedBy(Comparator<B> comparator) {
    return new Builder<B>(comparator);
  }
public static <B> Builder<B> orderedBy(Comparator<B> comparator) {
    return new Builder<B>(comparator);
  }
Creates and returns a new builder, configured to build {@code MinMaxPriorityQueue} instances
that use {@code comparator} to determine the least and greatest elements.