guava/src/com/google/common/graph/ElementOrder.java
public static <S> ElementOrder<S> sorted(Comparator<S> comparator) {
    return new ElementOrder<S>(Type.SORTED, comparator);
  }
public static <S> ElementOrder<S> sorted(Comparator<S> comparator) {
    return new ElementOrder<S>(Type.SORTED, comparator);
  }
Returns an instance which specifies that the ordering of the elements is guaranteed to be
determined by {@code comparator}.