摘要: Predicate的源码: Predicate是个断言式接口其参数是<T,boolean>,也就是给一个参数T,返回boolean类型的结果。 接下来我们看看Predicate默认实现的三个重要方法and,or和negate 这三个方法对应了java的三个连接符号&&、||和!,例子: 我们定义了三 阅读全文
posted @ 2019-01-15 11:18 lastsoul_ 阅读(586) 评论(0) 推荐(0)
摘要: Consumer有相关的原始类型实现,是Consumer的特例(This is the primitive type specialization of{@link Consumer} for {@code double}.) 相关的实现有三个IntConsumer,LongConsumer,Dou 阅读全文
posted @ 2019-01-14 18:15 lastsoul_ 阅读(1931) 评论(0) 推荐(0)