public final @NotNull JBIterable<E> sort(@NotNull Comparator<? super E> comparator) {
    ArrayList<E> list = addAllTo(new ArrayList<>());
    list.sort(comparator);
    return from(list);
  }
public final @NotNull JBIterable<E> sort(@NotNull Comparator<? super E> comparator)