Collections removeAll method

前端 未结 5 597

I would like to know if something like below is possible,

list.removeAll(namesToRemove)

I hope the context is understandable.

The

5条回答
  •  失恋的感觉
    2021-01-07 09:58

    Collection list = Collections2.filter(list, mo -> !namesToRemove.contains(mo.getName()));
    

提交回复
热议问题