Tuple2的Java 8 lambda表达式

时间:2017-12-23 11:52:40

标签: lambda java-8

     JavaRDD<Tuple2<Integer, Double>> fin =   res.map(new Function<Tuple2<Integer,Double>, Tuple2<Integer,Double>>() {
           @Override
           public Tuple2<Integer,Double> call(Tuple2<Integer,Double> tuple) {


            Tuple2<Integer, Double> temp =  new Tuple2<>(tuple._1 , (tuple._2/cnt.get(tuple._1)));
            return temp;
           }
         });

如何在Java中使用lambda表示这个?

0 个答案:

没有答案