java.util.function 它包含了很多类,用来支持 Java的 函数式编程,该包中的函数式接口有:
序号 | 接口 & 描述 |
---|---|
1 | **BiConsumer<T,U>**代表了一个接受两个输入参数的操作,并且不返回任何结果 |
2 | **BiFunction<T,U,R>**代表了一个接受两个输入参数的方法,并且返回一个结果 |
3 | **BinaryOperator |
4 | **BiPredicate<T,U>**代表了一个两个参数的boolean值方法 |
5 | BooleanSupplier代表了boolean值结果的提供方 |
6 | **Consumer |
7 | DoubleBinaryOperator代表了作用于两个double值操作符的操作,并且返回了一个double值的结果。 |
8 | DoubleConsumer代表一个接受double值参数的操作,并且不返回结果。 |
9 | **DoubleFunction |
10 | DoublePredicate代表一个拥有double值参数的boolean值方法 |
11 | DoubleSupplier代表一个double值结构的提供方 |
12 | DoubleToIntFunction接受一个double类型输入,返回一个int类型结果。 |
13 | DoubleToLongFunction接受一个double类型输入,返回一个long类型结果 |
14 | DoubleUnaryOperator接受一个参数同为类型double,返回值类型也为double 。 |
15 | **Function<T,R>**接受一个输入参数,返回一个结果。 |
16 | IntBinaryOperator接受两个参数同为类型int,返回值类型也为int 。 |
17 | IntConsumer接受一个int类型的输入参数,无返回值 。 |
18 | **IntFunction |
19 | IntPredicate:接受一个int输入参数,返回一个布尔值的结果。 |
20 | IntSupplier无参数,返回一个int类型结果。 |
21 | IntToDoubleFunction接受一个int类型输入,返回一个double类型结果 。 |
22 | IntToLongFunction接受一个int类型输入,返回一个long类型结果。 |
23 | IntUnaryOperator接受一个参数同为类型int,返回值类型也为int 。 |
24 | LongBinaryOperator接受两个参数同为类型long,返回值类型也为long。 |
25 | LongConsumer接受一个long类型的输入参数,无返回值。 |
26 | **LongFunction |
27 | LongPredicateR接受一个long输入参数,返回一个布尔值类型结果。 |
28 | LongSupplier无参数,返回一个结果long类型的值。 |
29 | LongToDoubleFunction接受一个long类型输入,返回一个double类型结果。 |
30 | LongToIntFunction接受一个long类型输入,返回一个int类型结果。 |
31 | LongUnaryOperator接受一个参数同为类型long,返回值类型也为long。 |
32 | **ObjDoubleConsumer |
33 | **ObjIntConsumer |
34 | **ObjLongConsumer |
35 | **Predicate |
36 | **Supplier |
37 | **ToDoubleBiFunction<T,U>**接受两个输入参数,返回一个double类型结果 |
38 | **ToDoubleFunction |
39 | **ToIntBiFunction<T,U>**接受两个输入参数,返回一个int类型结果。 |
40 | **ToIntFunction |
41 | **ToLongBiFunction<T,U>**接受两个输入参数,返回一个long类型结果。 |
42 | **ToLongFunction |
43 | **UnaryOperator |