From 5da2879c75cd6d67008f0507d9aaa1cd4cf81ed1 Mon Sep 17 00:00:00 2001 From: LingCoder Date: Sun, 21 Apr 2019 19:53:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4docsify=E6=8E=92=E7=89=88?= =?UTF-8?q?=E5=B7=AE=E5=BC=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/book/13-Functional-Programming.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/book/13-Functional-Programming.md b/docs/book/13-Functional-Programming.md index b02b09c..8c909ef 100644 --- a/docs/book/13-Functional-Programming.md +++ b/docs/book/13-Functional-Programming.md @@ -653,19 +653,19 @@ public class FunctionalAnnotation { | **特征** |**函数式方法名**|**示例**| | :---- | :----: | :----: | -|无参;
无返回值|**Runnable**
(java.lang)
`run()`|**Runnable**| -|无参;
返回类型任意|**Supplier**
`get()`
`getAs类型()`| **Supplier
BooleanSupplier
IntSupplier
LongSupplier
DoubleSupplier**| -|无参数;
返回类型任意|**Callable**
(java.util.concurrent)
`call()`|**Callable\**| -|1 参数;
无返回值|**Consumer**
`accept()`|**Consumer
IntConsumer
LongConsumer
DoubleConsumer**| -|2 参数 **Consumer**|**BiConsumer**
`accept()`|**BiConsumer\**| -|2 参数 **Consumer**;
1 引用;
1 基本类型|**Obj类型Consumer**
`accept()`|**ObjIntConsumer
ObjLongConsumer\
ObjDoubleConsumer\**| -|1 参数;
返回类型不同|**Function**
`apply()`
**To类型** 和 **类型To类型**
`applyAs类型()`|**Function\
IntFunction\
LongFunction\
DoubleFunction
ToIntFunction
ToLongFunction\
ToDoubleFunction\
IntToLongFunction
IntToDoubleFunction
LongToIntFunction
LongToDoubleFunction
DoubleToIntFunction
DoubleToLongFunction**| -|1 参数;
返回类型相同|**UnaryOperator**
`apply()`|**UnaryOperator
IntUnaryOperator
LongUnaryOperator
DoubleUnaryOperator**| -|2 参数类型相同;
返回类型相同|**BinaryOperator**
`apply()`|**BinaryOperator\
IntBinaryOperator
LongBinaryOperator
DoubleBinaryOperator**| -|2 参数类型相同;
返回整型|Comparator
(java.util)
`compare()`|**Comparator\**| -|2 参数;
返回布尔型|**Predicate**
`test()`|**Predicate\
BiPredicate\
IntPredicate
LongPredicate
DoublePredicate**| +|无参数;
无返回值|**Runnable**
(java.lang)
`run()`|**Runnable**| +|无参数;
返回类型任意|**Supplier**
`get()`
`getAs类型()`| **Supplier\
BooleanSupplier
IntSupplier
LongSupplier
DoubleSupplier**| +|无参数;
返回类型任意|**Callable**
(java.util.concurrent)
`call()`|**Callable\**| +|1 参数;
无返回值|**Consumer**
`accept()`|**Consumer\
IntConsumer
LongConsumer
DoubleConsumer**| +|2 参数 **Consumer**|**BiConsumer**
`accept()`|**BiConsumer\**| +|2 参数 **Consumer**;
1 引用;
1 基本类型|**Obj类型Consumer**
`accept()`|**ObjIntConsumer\
ObjLongConsumer\
ObjDoubleConsumer\**| +|1 参数;
返回类型不同|**Function**
`apply()`
**To类型** 和 **类型To类型**
`applyAs类型()`|**Function\
IntFunction\
LongFunction\
DoubleFunction\
ToIntFunction\
ToLongFunction\
ToDoubleFunction\
IntToLongFunction
IntToDoubleFunction
LongToIntFunction
LongToDoubleFunction
DoubleToIntFunction
DoubleToLongFunction**| +|1 参数;
返回类型相同|**UnaryOperator**
`apply()`|**UnaryOperator\
IntUnaryOperator
LongUnaryOperator
DoubleUnaryOperator**| +|2 参数类型相同;
返回类型相同|**BinaryOperator**
`apply()`|**BinaryOperator\
IntBinaryOperator
LongBinaryOperator
DoubleBinaryOperator**| +|2 参数类型相同;
返回整型|Comparator
(java.util)
`compare()`|**Comparator\**| +|2 参数;
返回布尔型|**Predicate**
`test()`|**Predicate\
BiPredicate\
IntPredicate
LongPredicate
DoublePredicate**| |参数基本类型;
返回基本类型|**类型To类型Function**
`applyAs类型()`|**IntToLongFunction
IntToDoubleFunction
LongToIntFunction
LongToDoubleFunction
DoubleToIntFunction
DoubleToLongFunction**| -|2 参数类型不同|**Bi操作**
(不同方法名)|**BiFunction\
BiConsumer\
BiPredicate
ToIntBiFunction\
ToLongBiFunction\
ToDoubleBiFunction (不同方法名)|**BiFunction\
BiConsumer\
BiPredicate\
ToIntBiFunction\
ToLongBiFunction\
ToDoubleBiFunction\**| 此表仅提供些常规方案。通过上表,你应该或多或少能自行推导出更多行的函数式接口。