TreeSet 是带顺序的set. 那么它的顺序是如何实现的呢。 public TreeSet(Collection<? extends E> c) E 必须实现 comparable.
具体如何实现请参考 https://www.cnblogs.com/LZL-student/p/5903889.html
java TreeSet
原文:https://www.cnblogs.com/tangdatou/p/12756195.html