• Map转化为List


     List<JfAuction> jfAuctionListValue=null;                if(jfAuctionList!=null && jfAuctionList.size()>0){                    Map<Integer, JfAuction> jfAuctionMap = new HashMap<Integer, JfAuction>();                    for(JfAuction jfAuction:jfAuctionList){                         if (jfAuctionMap.get(jfAuction.getUser().getId()) == null) {                             // 如果没有此类型,则添加此类型的数值                            jfAuctionMap.put(jfAuction.getUser().getId(), jfAuction);                      }else{                            // 如果有此类型,则把此类型的数值修改为-->原来的数值+新数值,实现类似sum功能                             Integer sum=jfAuction.getScore()+jfAuctionMap.get(jfAuction.getUser().getId()).getScore();                           jfAuction.setScore(sum);                            jfAuctionMap.put(jfAuction.getUser().getId(), jfAuction);                        }                     }

                    }

  • 相关阅读:
    HUE配置HBase
    HUE配置HIVE
    HUE配置hadoop
    HUE的安装
    CM (Cloudera Manager) 的安装,便于CDH的离线部署
    MapReduce -- 最短路径
    Mapreduce -- PageRank
    CentOS 建立本地yum源服务器
    js移动设备手机跳转地址代码
    离线存储
  • 原文地址:https://www.cnblogs.com/zifashaonian10000/p/4218294.html
Copyright © 2020-2023  润新知