Count number of items with property

后端 未结 10 2536
不思量自难忘°
不思量自难忘° 2021-02-13 12:18

I have list List where Custom is like

class Custom{
    public int id;
    public String name;
}

How to

10条回答
  •  [愿得一人]
    2021-02-13 13:11

    There is no easier solution with the standard collections. You have to iterate over the list and count the occurrences of the name.

提交回复
热议问题