网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

java基础14.4.2 Set接口实现类TreeSet

时间:2024-11-07 02:04:41

1、public E first();返回此Set集合中当前第一个元素。

java基础14.4.2 Set接口实现类TreeSet

2、public E last();返回此Set集合中当前最后一个元素。

java基础14.4.2 Set接口实现类TreeSet

3、public Comparator<? super E> comparator();返回集合中的元素进行排序的比较器,如果使用自然排序,则返回null

java基础14.4.2 Set接口实现类TreeSet

4、SortedSet<E> headSet(E toElement);返回一个新的Set集合心机和包含toElement(不包含)之前的所有对象。

java基础14.4.2 Set接口实现类TreeSet

5、SortedSet<E> subSet(E fromElement, E toElement);返回一个新Set集合新集合包含fromElement(包含)与toElement(不包含)对象之间的所有对象。

java基础14.4.2 Set接口实现类TreeSet

6、SortedSet<E> tailSet(E fromElement);返回一个新Set集合,新集合包含fromElement(包含)之后的所有对象。

java基础14.4.2 Set接口实现类TreeSet
© 2025 一点资料
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com