elephpant 2021-07-02 11:44 采纳率: 76.2%
浏览 936
已结题

从List中获取某个值

DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=1270, value=11.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=1271, value=46.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=1272, value=71.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=1273, value=34.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=1274, value=62.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=1275, value=64.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=180, value=64.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=181, value=29.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=182, value=20.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=183, value=64.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=184, value=26.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
DataDO{primaryKey=null, sourceId=11618820768178833, dataAttribute='ANA', oneLevel=1, twoLevel=1, threeLevel=185, value=16.0, qualityFactor=null, saveTime=Wed Jun 30 18:05:00 CST 2021}
这些数据保存在一个list中,请取出list中value值,用Java语言

  • 写回答

1条回答 默认 最新

  • 关注

    List.stream().collect(Collectors.groupingBy(x -> x.getValue()));
    for(String key:collect.keySet())
    System.out.println(key);

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 12月23日
  • 已采纳回答 12月15日

悬赏问题

  • ¥15 QT6颜色选择对话框显示不完整
  • ¥20 能提供一下思路或者代码吗
  • ¥15 用twincat控制!
  • ¥15 请问一下这个运行结果是怎么来的
  • ¥15 单通道放大电路的工作原理
  • ¥30 YOLO检测微调结果p为1
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下