具体而言,我正在寻找类似的清洁符号的收藏< T> .TrueForAll
/ 存在
,等等。
Specifically, I'm looking for similarly clean notation to the Collection<T>.TrueForAll
/ Exists
, etc.
感觉有异味有写一个foreach循环来检查每个对象的方法的返回,所以我希望有一个更好的Java成语吧。
It feels smelly to have to write a foreach loop to inspect the return of a method on each object, so I'm hoping there's a better Java idiom for it.
$p$pdicates在谷歌集合库提供。