public final ListType sortedBy(Comparator<? super Type> comparator) {
        return constructor.apply(items.stream().sorted(comparator).toList(), false);
    }
Returns the items sorted by the given comparator.
vespajlib/src/main/java/com/yahoo/collections/AbstractFilteringList.java