public static <S> ElementOrder<S> sorted(Comparator<S> comparator) {
    return new ElementOrder<S>(Type.SORTED, Objects.requireNonNull(comparator));
  }
public static <S> ElementOrder<S> sorted(Comparator<S> comparator)