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 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了