public interface Predicate<T> { @CanIgnoreReturnValue boolean apply(@Nullable T input); boolean equals(@Nullable Object object); } 很明显predicate返回boolean值,然后用户根据boolean来过滤数据。 Google为predicate提供的实现为predicates
guava 函数式编程三兄弟之Predicate的用法
predicate主要用于过滤数据下面是predicate接口:
猜你喜欢
转载自chen-sai-201607223902.iteye.com/blog/2367443
今日推荐
周排行