当前位置:网站首页>Introduction to intstream API
Introduction to intstream API
2022-06-25 04:24:00 【It's hard not to write code all day】
1 establish int Type array
import java.util.stream.IntStream;
IntStream range = IntStream.range(0, 10);
2 boxed()
boxed It's always been mapToObject(Integer::vaueOf)
The elements in the collection are of reference type , Basic data types need to be boxed , To become list
IntStream.range(0,10).boxed().collect(Collectors.toList());
3 mapToDouble()
These three methods return three specified types of stream Other use methods and functions besides map similar , amount to map A special case of the method .
list.stream().mapToDouble(User::getAge).sum()// and
list.stream().mapToDouble(User::getAge).max()// Maximum
list.stream().mapToDouble(User::getAge).min()// Minimum
list.stream().mapToDouble(User::getAge).average()// Average
边栏推荐
- "Renaissance" in the digital age? The bottom digital collection makes people happy and sad
- Cesium 加载显示热力图
- acmStreamOpen返回值问题
- Numpy NP tips: use OpenCV to interpolate and zoom the array to a fixed shape cv2 resize(res, dsize=(64, 64), interpolation=cv2. INTER_ CUBIC)
- Siddhartha: the book of life can be regurgitated frequently
- 1280_ C language to find the average value of two unsigned integer
- mysql的tinyint字段类型判断的疑惑
- Numpy NP tips: squeeze and other processing of numpy arrays
- 小心被偷脸!天天用的人脸识别风险原来这么多?
- 长沙“求才”:“下力气”与“出实招”并进,“快发展”和“慢生活”兼得
猜你喜欢

UCLA | 用于黑盒优化的生成式预训练

Interview with Mo Tianlun | ivorysql wangzhibin - ivorysql, an Oracle compatible open source database based on PostgreSQL

地方/園區產業規劃之 “ 如何進行產業定比特 ”

Trading system development (IV) - trading counter system

Cesium 加载显示热力图

Where is the red area of OpenCV?

地方/园区产业规划之 “ 如何进行产业定位 ”
![[harmony OS] [arkui] ETS development graphics and animation drawing](/img/9d/0ac2b3d8bcdcd610767df930e2fa4e.png)
[harmony OS] [arkui] ETS development graphics and animation drawing

Simple integration of client go gin 11 delete

navicat可不可以直接操作安卓数据库SQLite
随机推荐
Vigilance against over range collection of privacy - ten mobile app violations
Hello CTP (I) - basic knowledge of futures
1. Phase II of the project - user registration and login
讲座记录《多种空间大地测量技术的数据处理方法和应用》
Intel 13th generation core showed its true colors for the first time: 68mb cache improved significantly
Monitoring pancakeswap new token
The 5th series of NFT works of missing parts was launched on the sandbox market platform
95% 程序员都在这里摸鱼……
[kubernetes series] installation and use of Helm
How many images can opencv open?
1、项目第二阶段——用户注册和登陆
Laravel document sorting 2. Route related
微信小程序中的列表渲染
web3.eth. Getpendingtransactions() returns null?
Text keyword extraction: ansj
Watch out for the stolen face! So many risks of face recognition used every day?
Development of trading system (V) -- Introduction to Sinovel counter
代錶多樣性的彩色 NFT 系列上線 The Sandbox 市場平臺
[team learning] SQL programming language notes - task04
SEO的5大关键指标:排名+流量+会话+停留时长+跳出率