lanm
@Test public void testIplan() { Map<String,Map<String,List<IPlan>>> iPlanMap = iPlanDao.getIPlans().stream().collect(Collectors.groupingBy((iPlan) -> { if (iPlan.getTerm() == 1) { return "1"; } else if (iPlan.getTerm() == 3) { return "3"; } else if (iPlan.getTerm() == 6) { return "6"; } else if (iPlan.getTerm() == 12) { return "12"; } else { return ""; } }, Collectors.groupingBy((iPlan) -> { if (IPlan.STATUS_RaiSING.equals(iPlan.getStatus())) { return "raising"; } else if (IPlan.STATUS_ANNOUNCING.equals(iPlan.getStatus())) { return "announcing"; } else { return "finished"; } }))); Map<String,List<IPlan>> iPlan1Term = iPlanMap.get("1"); Map<String,List<IPlan>> iPlan3Term = iPlanMap.get("3"); Map<String,List<IPlan>> iPlan6Term = iPlanMap.get("6"); Map<String,List<IPlan>> iPlan12Term = iPlanMap.get("12"); List<IPlan> iPlans1 = getIPlanListAll(iPlan1Term.get("raising"),iPlan1Term.get("announcing"),iPlan1Term.get("finished")); List<IPlan> iPlans3 = getIPlanListAll(iPlan3Term.get("raising"),iPlan3Term.get("announcing"),iPlan3Term.get("finished")); List<IPlan> iPlans6 = getIPlanListAll(iPlan6Term.get("raising"),iPlan6Term.get("announcing"),iPlan6Term.get("finished")); List<IPlan> iPlans12 = getIPlanListAll(iPlan12Term.get("raising"),iPlan12Term.get("announcing"),iPlan12Term.get("finished")); System.out.println("ok"); } private List<IPlan> getIPlanListAll(List<IPlan>... iPlans) { List<IPlan> iPlanList = new ArrayList<>(); if (iPlans != null && iPlans.length > 0) { for (List<IPlan> list : iPlans) { if (list != null && list.size() > 0) { iPlanList.addAll(list); } } } return iPlanList; }
文章最后发布于: 2018-01-05 20:41:06
相关阅读
CNN(卷积神经网络)的误差反传(error back propagation)中有一个非常关键的的步骤就是将某个卷积(Convolve)层的误差传到前一层
123_今天被10085给忽悠了:每月免费送100分钟主叫,持续12
早上接到10085电话,说免费送我每月100分钟主叫,12个月有效,12个月后自动取消。 我问为什么是10085,不是10086,他说10085是外呼号码。说
1. 引子 try…catch…finally恐怕是大家再熟悉不过的语句了,而且感觉用起来也是很简单,逻辑上似乎也是很容易理解。不过,我亲自体验
package com.work4; /** * * @author Echo * */ public class Test { public static void main(String[] args) {
最近一朋友想做个淘宝导购站,让我帮忙找下关键词,老样子先看下拉框再看相关搜索、百度指数,最终决择在关键词推荐,最后一步的时候发现