code: public static <S> ElementOrder<S> sorted(Comparator<S> comparator) {
      return new ElementOrder<S>(Type.SORTED, comparator);
    }
docs: Returns an instance which specifies that the ordering of the elements is guaranteed to be
  determined by {@code comparator}.