您当前的位置: 首页 >  Java

white camel

暂无认证

  • 0浏览

    0关注

    442博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

重学Java8新特性(三) : Collection、List、Map 新增的API, Collectors收集器

white camel 发布时间:2022-08-05 08:39:39 ,浏览量:0

文章目录
  • 一、Collection、List 新增的方法
    • 1.1、removeIf
    • 1.2、replaceAll
    • 1.3、sort
    • 1.4、spliterator
  • 二、Map 新增的方法
    • 2.1、getOrDefault
    • 2.2、forEach
    • 2.3、putIfAbsent
    • 2.4、compute
    • 2.5、computeIfAbsent
    • 2.6、computeIfPresent
    • 2.7、merge
    • 2.8、remove(key, value)
    • 2.9、replace、replaceAll
  • 三、Collectors 收集方法
    • toCollection
    • toList、toSet
    • toMap
    • joining
    • mapping/flatMapping
    • filtering
    • counting
    • minBy/maxBy
    • summingInt/summingLong/summingDouble
    • averagingInt/averagingLong/averagingDouble
    • groupingBy
      • 多级分组
    • groupingByConcurrent
    • partitioningBy
    • BinaryOperator
    • summarizingInt

一、Collection、List 新增的方法

Collection中新增的方法

  • removeIf
  • stream
  • parallelStream
  • spliterator

List中新增的方法

  • replaceAll
  • sort
1.1、removeIf

default boolean removeIf​(Predicate

关注
打赏
1661428283
查看更多评论
立即登录/注册

微信扫码登录

0.0504s