码迷,mamicode.com
首页 > 其他好文 > 详细

map put值 使用匿名函数

时间:2018-09-15 01:16:52      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:params   xixi   ash   sele   函数   add   set   ram   list   

 1       List<Map<String, Object>> list = setRoleMenuRlMapper.selectMapByParams(params);
 2 //         Map map = new HashMap<String, Object>();
 3 //         map.put("hahaha","111");
 4 //         map.put("xixi", "22222222");
 5 //        list.add(map);
 6         
 7         
 8         list.add(new HashMap<String, Object>() {
 9             {
10             put("haha","1111");
11             put("xixi", "22222222");}
12         });

代码块会 执行

map put值 使用匿名函数

标签:params   xixi   ash   sele   函数   add   set   ram   list   

原文地址:https://www.cnblogs.com/hnqm/p/9649629.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!