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. limit/skip
11.6. sorted
11.7. distinct
11.8. forEach
11.9. count
11.10. 流转列表
11.11. collect
11.11.1. Collectors.toList() 列表转字符串
11.11.2. Collectors.joining() 连接字符串
11.11.3. 转 Set Collectors.toSet()
11.11.4. Collectors.teeing()
11.12. takeWhile 和 dropWhile
11.13. 合并 Stream
11.14. mapToObj
11.15. 混合使用的例子
11.15.1. List to Stream
11.16. 流复用 streamSupplier
11.17. Parallel Streams(并行流)
11.18. IntStream / LongStream / DoubleStream

11.1. Stream.of

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