当前位置:网站首页>Lambda中间操作map
Lambda中间操作map
2022-06-12 00:36:00 【Leon_Jinhai_Sun】
map
可以把对流中的元素进行计算或转换。
例如:
打印所有作家的姓名
List<Author> authors = getAuthors();
authors
.stream()
.map(author -> author.getName())
.forEach(name->System.out.println(name));// 打印所有作家的姓名
List<Author> authors = getAuthors();
// authors.stream()
// .map(author -> author.getName())
// .forEach(s -> System.out.println(s));
authors.stream()
.map(author -> author.getAge())
.map(age->age+10)
.forEach(age-> System.out.println(age));边栏推荐
- Experiment 6 constructor + copy construction
- 详解异步任务:函数计算的任务触发去重
- Use select to switch coroutines
- How to send Apple phone WPS files to QQ mailbox
- 汛期化工和危险品企业如何加强防控重大安全风险
- 多年测试菜鸟对黑盒测试的理解
- MySQL basic tutorial -- MySQL transaction and storage engine
- 验证码是自动化的天敌?看看阿里P7大神是怎么解决的
- Cube technology interpretation | detailed explanation of cube applet Technology
- No permission to mount SMB share prompt directory
猜你喜欢

Experiment 7 class construction and static member function

Bgfx multithreaded rendering

環境搭建2

Redis master-slave replication, sentinel mode and cluster

Characteristics of JS logical operators
![[flume] notes](/img/33/50f14b0267c5e502970cee0278aa71.jpg)
[flume] notes

Why are the values of ordereddict not equal- Why are the values of an OrderedDict not equal?

wps表格怎么取消智能表格样式
![[day 5 of JUC learning] reference atomic classes and attribute modifiers](/img/e5/3d39d34d8c423ec71da59f9b418f5a.png)
[day 5 of JUC learning] reference atomic classes and attribute modifiers

What are the software development processes of the visitor push mall?
随机推荐
Dry goods | what do testers need to do for a complete performance test?
C language exercise: esp32 ble Low Power Bluetooth server data packaging and client data analysis
"Failure" of the prospectus of Laowang: Laowang made its first dash for listing in Hong Kong, and the turnover rate continued to decline
2022 edition of global and Chinese hexamethylene chloride industry dynamic research and investment prospect forecast report
2021 inventory: Top 10 low code development platforms at home and abroad
[day 7 of JUC learning] reentrantlock and reentrantreadwritelock
DDD exaggeration, Eric Evans made a bad start
No permission to mount SMB share prompt directory
Flink CDC + Hudi 海量数据入湖在顺丰的实践
详解异步任务:函数计算的任务触发去重
Anfulai embedded weekly report (issue 254): February 21, 2022 to February 27, 2022
How to uninstall pscs6 in win10 system
The latest report of Xinsi technology shows that 97% of applications have vulnerabilities
Experiment 6 constructor + copy construction
2022 Tibet's latest eight members (security officer) simulated test question bank and answers
Investment analysis and prospect Trend Research Report of global and Chinese cyclopentanyl chloride industry 2022-2028
验证码是自动化的天敌?看看阿里P7大神是怎么解决的
What is bonded warehouse and what is the difference between them
環境搭建2
如何优化PlantUML流程图(时序图)