函数式接口 | 函数描述符 | 原始类型特化 |
---|---|---|
Predicate<T> | T-> boolean | IntPredicate,LongPredicate, DoublePredicate |
Consumer<T> | T->void | IntConsumer,LongConsumer,DoubleConsumer |
Function<T,R> | T->R | IntFunction<R>,IntToDoubleFunction,IntToLongFunction,LongFunction<R>,LongToDoubleFunction,LongToIntFunction,DoubleFunction<R>,ToIntFunction<T>,ToDoubleFunction<T>,ToLongFunction<T> |
Supplier<T> | ()->T | BooleanSupplier,IntSupplier, LongSupplier,DoubleSupplier |
UnaryOperator<T> | T->T | IntUnaryOperator,LongU |
Java 8中的常用函数式接口
最新推荐文章于 2023-06-26 22:34:33 发布