What is the best way to filter a Java Collection?

后端 未结 27 4043
故里飘歌
故里飘歌 2020-11-21 06:55

I want to filter a java.util.Collection based on a predicate.

27条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-21 07:16

    The Collections2.filter(Collection,Predicate) method in Google's Guava library does just what you're looking for.

提交回复
热议问题