博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
java list分组 list里面分装的都是对象 按照对象的属性来分组
阅读量:7036 次
发布时间:2019-06-28

本文共 487 字,大约阅读时间需要 1 分钟。

http://www.iteye.com/problems/86110

——————————————————————————————————————————————————————————

List
list = billFacade.findBillByUserId(userInfo); Map
group = new HashMap
();String type = null;Float moneyTotal = 0f;for(Bill bill : list){type = bill.getType(); moneyTotal = group.get(type); if(moneyTotal == null){ moneyTotal = 0f; } group.put(type, moneyTotal + bill.getMoney()); }

 

转载地址:http://nrjal.baihongyu.com/

你可能感兴趣的文章
/etc/vim/vimrc的一个的配置
查看>>
浏览器中关于事件的那点事儿(转)
查看>>
c#Lamdba表达式与托付
查看>>
VC皮肤库SkinSharp 1.0.6.6的使用
查看>>
php上传图片到server
查看>>
如何对 GIT 分支进行规划?
查看>>
说说非托管资源的回收
查看>>
虚拟机安装麒麟3.2时报unkown filesystem,you need to load the linux kernel first
查看>>
Node.js模块封装及使用
查看>>
java selenium (十) 操作浏览器
查看>>
检测光纤的同心性
查看>>
Vim快捷键分类
查看>>
【BOOM】一款有趣的Javascript动画效果
查看>>
关于java mail 发邮件的问题总结(转)
查看>>
Visual Prolog 的 Web 专家系统 (9)
查看>>
python匹配ip正则
查看>>
Win2003x64系统
查看>>
设计模式 : Template method 模板方法模式 -- 行为型
查看>>
第二十九节,装饰器
查看>>
[LintCode] Valid Palindrome 验证回文字符串
查看>>