Java - map a list of objects to a list with values of their property attributes

后端 未结 8 1804
星月不相逢
星月不相逢 2020-12-01 01:28

I have the ViewValue class defined as follows:

class ViewValue {

private Long id;
private Integer value;
private String description;
private View view;
priv         


        
8条回答
  •  生来不讨喜
    2020-12-01 02:06

    That depends on what you then do with the List, and the List

    For example you might get sufficient functionality from creating your own List implementation that wraps a List, implementing iterator() with an iterator implementation that iterates over the ViewValues, returning the id.

提交回复
热议问题