Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

第 11 章 Stream

目录

11.1. Stream.of
11.2. Stream.ofNullable
11.3. filter
11.4. map
11.5. peek 打印调试信息
11.6. limit/skip
11.7. sorted
11.8. distinct
11.9. forEach
11.10. count
11.11. 流转列表
11.12. collect
11.12.1. Collectors.toList() 列表转字符串
11.12.2. Collectors.joining() 连接字符串
11.12.3. 转 Set Collectors.toSet()
11.12.4. Collectors.teeing()
11.13. takeWhile 和 dropWhile
11.14. 合并 Stream
11.15. mapToObj
11.16. Collectors
11.16.1.
11.16.2. 过滤空值
11.17. 混合使用的例子
11.17.1. List to Stream
11.18. 流复用 streamSupplier
11.19. Parallel Streams(并行流)
11.20. IntStream
11.21. LongStream
11.22. DoubleStream
11.23. 例子
11.23.1. Markdown 转 CSV

11.1. Stream.of

		
Stream<String> stream = Stream.of("Hollis", "HollisChuang", "hollis", "Hello", "HelloWorld", "Hollis");		
		
		
		
Stream<Integer> mystream = Stream.of(10, 12, 14, 16);