|
5 | 5 | |:-----:|:--------|:-------| |
6 | 6 | | `Predicate<T>` | `T->boolean` | `IntPredicate,LongPredicate, DoublePredicate` | |
7 | 7 | | `Consumer<T>` | `T->void` | `IntConsumer,LongConsumer, DoubleConsumer` | |
8 | | -| `Function<T,R>` | `T->R` | `IntFunction<R>, IntToDoubleFunction, IntToLongFunction, LongFunction<R>, LongToDoubleFunction, LongToIntFunction, DoubleFunction<R>, ToIntFunction<T>, ToDoubleFunction<T>, ToLongFunction<T>` | |
| 8 | +| `Function<T,R>` | `T->R` | `IntFunction<R>, IntToDoubleFunction,` <br/> `IntToLongFunction, LongFunction<R>,` <br/> `LongToDoubleFunction, LongToIntFunction, ` <br/> `DoubleFunction<R>, ToIntFunction<T>, ` <br/> `ToDoubleFunction<T>, ToLongFunction<T>` | |
9 | 9 | | `Supplier<T>` | `()->T` | `BooleanSupplier,IntSupplier, LongSupplier, DoubleSupplier` | |
10 | 10 | | `UnaryOperator<T>` | `T->T` | `IntUnaryOperator, LongUnaryOperator, DoubleUnaryOperator` | |
11 | 11 | | `BinaryOperator<T>` | `(T,T)->T` | `IntBinaryOperator, LongBinaryOperator, DoubleBinaryOperator` | |
|
22 | 22 | | 创建对象 | `() -> new Project()` | `Supplier<Project>` | |
23 | 23 | | 消费一个对象 | `(Project p) -> System.out.println(p.getStars())` | `Consumer<Project>` | |
24 | 24 | | 从一个对象中选择/提取 | `(int a, int b) -> a * b` | `IntBinaryOperator` | |
25 | | -| 比较两个对象 | `(Project p1, Project p2) -> p1.getStars().compareTo(p2.getStars())` | `Comparator<Project>或 BiFunction<Project, Project, Integer> 或 ToIntBiFunction<Project, Project>` | |
| 25 | +| 比较两个对象 | `(Project p1, Project p2) -> p1.getStars().compareTo(p2.getStars())` | `Comparator<Project> 或 BiFunction<Project, ` <br/> `Project, Integer> 或 ToIntBiFunction<Project, Project>` | |
26 | 26 |
|
27 | 27 |
|
0 commit comments