| 没有参数;没有返回值 | Runnable (java.lang) run() | Runnable |
| 没有参数;可以返回任何类型 | Supplier get() getAstype() | Supplier<T> BooleanSupplier IntSupplier LongSupplier DoubleSupplier |
| 没有参数;可以返回任何类型 | Callable (java.util.concurrent) call() | Callable<V> |
| 一个参数;没有返回值 | Consumer accept() | Consumer<T> IntConsumer LongConsumer DoubleConsumer |
两个参数的Consumer | BiConsumer accept() | BiConsumer<T,U> |
两个参数的Consumer;第一个参数是引用,第二个参数是基本类型 | ObjtypeConsumer accept() | ObjIntConsumer<T> ObjLongConsumer<T> ObjDoubleConsumer<T> |
| 一个参数;返回值为不同类型 | Function apply() Totype & typeTotype: applyAstype() | Function<T,R> IntFunction<R> LongFunction<R> DoubleFunction<R> ToIntFunction<T> ToLongFunction<T> ToDoubleFunction<T> IntToLongFunction IntToDoubleFunction LongToIntFunction LongToDoubleFunction DoubleToIntFunction DoubleToLongFunction |
| 一个参数;返回值为相同类型 | UnaryOperator apply() | UnaryOperator<T> IntUnaryOperator LongUnaryOperator DoubleUnaryOperator |
| 两个相同类型的参数;返回值也是相同类型 | BinaryOperator apply() | BinaryOperator<T> IntBinaryOperator LongBinaryOperator DoubleBinaryOperator |
两个相同类型的参数;返回int | Comparator (java.util) compare() | Comparator<T> |
两个参数;返回boolean | Predicate test() | Predicate<T> BiPredicate<T,U> IntPredicate LongPredicate DoublePredicate |
| 基本类型的参数;返回值也是基本类型 | typeTotypeFunction applyAstype() | IntToLongFunction IntToDoubleFunction LongToIntFunction LongToDoubleFunction DoubleToIntFunction DoubleToLongFunction |
| 两个参数;不同类型 | Bi+操作名(方法名会变化) | BiFunction<T,U,R> BiConsumer<T,U> BiPredicate<T,U> ToIntBiFunction<T,U> ToLongBiFunction<T,U> ToDoubleBiFunction<T,U> |