Java Stream API: 获取竞标列表中符合条件的竞标ID
tenderBidList.stream() .filter(r -> r.getInt("count") == tenderCount) .sorted(Comparator.comparingDouble((Record r) -> (r.get("bid_money") == null) ? Double.MAX_VALUE : r.getDouble("bid_money")) .thenComparing(r -> r.getTimestamp("create_time"))) .map(r -> r.getLong("id")) .collect(Collectors.toList());
原文地址: https://www.cveoy.top/t/topic/p8jM 著作权归作者所有。请勿转载和采集!