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
  • java基础14.3.2 List接口实现类
  • java基础14.3.2 Set接口
  • 认识Java集合类Collection接口
  • Collection的Set接口实现与HashSet类
  • java基础10.8.1 接口
  • 热门搜索
    秦皇岛旅游攻略 仙剑奇侠传5前传攻略 贵州荔波旅游攻略 dnf搬砖攻略 世家攻略 我的世界怎么去地牢 鲁迅简介资料 快穿之女配攻略 秋刀鱼怎么做好吃 超级减肥王