Lambda表达式_系统内置函数接口

public class FunctionInterface {
    public static void main(String[] args) {
        //系统内置的函数式接口
        //Predicate<T>      :  参数 T , 返回值 boolean
            //IntPredicate     int  ,  boolean
            //longPredicate     long , boolean
            //DoublePredicate     double, boolean

        //Consumer<T>        :  参数 T , 返回值 void
            //IntConsumer           int , void
            //LongConsumer          long , void
            //DoubleConsumer        double , void

         //Function<T,R>      :  参数 T , 返回值 R
             // IntFunction         int   ,  R
             // LongFunction         long ,  R
             // DoubleFunction       double, R
             //IntToLangFunction     int   , long
             //IntToDoubleFunction   int   , double
             //LongToIntFunction     long  , int
             //LongToDouble          long  , double
             //DoubleToIntFunction   double , int
             //DoubleToLangFunction   double , long

         //Supplier<T>        : 参数 无 , 返回值 T
         //UnaryOperator<T>         T      T
         //BinaryOperator<T>        T,U    T
         //BiFunction<T, U, R>      T,U     R
         //BiPredicate<T,U>         T,U     boolean
         //BiConsumer<T,U>          T,U     void
    }
}

 

posted @ 2020-03-23 17:08  少林拖地僧  阅读(296)  评论(0)    收藏  举报
Live2D