我需要按照Jsoup Elements容器的ownText()排序。有什么推荐的方法来完成这个任务吗?
将其转换为ArrayList以便与自定义比较器一起使用,这样做有意义吗?
顺便说一下,我尝试直接排序,例如Collections.sort(anElementsList)
但编译器抱怨:
Bound mismatch: The generic method sort(List<T>) of type Collections is not applicable for
the arguments (Elements). The inferred type Element is not a valid substitute for the
bounded parameter <T extends Comparable<? super T>>