How to make a new list with a property of an object which is in another list

前端 未结 6 1164
借酒劲吻你
借酒劲吻你 2020-12-22 16:49

Imagine that I have a list of certain objects:

List

And I need to generate another list including the ids of

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-22 17:44

    If someone get here after a few years:

    List stringProperty = (List) CollectionUtils.collect(listOfBeans, TransformerUtils.invokerTransformer("getProperty"));
    

提交回复
热议问题