Stream API的出现,显著推进了Java对函数式编程的支持。它允许开发者可以用声明式Declarative的方式处理数据集合(比如列表、数组等),还能有效利用多核处理器进行并行操作,提升应用程序的性能,同时保持代码简洁易读。 在这个视频中,我们将讲到: 00:00 Stream API的介绍 Introduction to Stream API 02:34 为什么要引入Stream API? Why use Stream API? 02:57 流的操作 Stream Operations Overview 04:12 创建流 Creating Streams 04:19 从集合创建流 From Collections 05:22 从数组创建流 From Arrays 05:58 使用Stream.of() Using Stream.of() 06:23 流的合并 Stream Merging 07:02 使用Stream.builder() Using Stream.builder() 08:58 从文件创建流 From Files 10:41 基础类型流创建 Primitive Type Streams 12:21 无限流创建 Infinite Streams 16:36 中间操作 Intermediate Operations 17:07 筛选和切片 Filtering and Slicing 20:46 映射 Mapping 29:14 排序 Sorting 34:38 终端操作 Terminal Operations 34:52 查找与匹配 Search and Match 37:38 聚合操作 Aggregation Operations 39:54 规约操作 Reduction Operations 41:50 收集操作 Collection Operations 47:25 自定义收集器 Custom Collectors 56:35 迭代操作 Iteration Operations 57:21 并行流的介绍 Introduction to Parallel Streams 59:34 并行流的顺序问题 Order Challenges in Parallel Streams 59:52 迭代操作 Iteration Operations (Operations forEach & forEachOrdered) 01:02:38 收集操作 java基础流 Collection Operations 01:03:48 自定义收集器 Custom Collectors 01:10:01 UNORDERED和CONCURRENT特性 UNORDERED & CONCURRENT Characteristics 01:14:57 并行流和顺序流一致性问题 Consistency Issues Between Parallel and Sequential Streams 01:18:37 并行流的使用场景 Use Cases for Parallel Streams版权声明:
本文来源网络,所有图片文章版权属于原作者,如有侵权,联系删除。
本文网址:https://www.bianchenghao6.com/h6javajc/2874.html