java – 为什么Collections.sort()仅适用于列表而不适用于集合?


A 07001 implementation based on a 07002. The elements are ordered using their 07003, or by a 07004 provided at set creation time, depending on which constructor is used.


Hash table and linked list implementation of the Set interface, with predictable iteration order. This implementation differs from HashSet in that it maintains a doubly-linked list running through all of its entries. This linked list defines the iteration ordering, which is the order in which elements were inserted into the set (insertion-order)

转载注明原文:java – 为什么Collections.sort()仅适用于列表而不适用于集合? - 代码日志