Example usage for org.apache.spark.api.java.function Function2 call

List of usage examples for org.apache.spark.api.java.function Function2 call

Introduction

In this page you can find the example usage for org.apache.spark.api.java.function Function2 call.

Prototype

R call(T1 v1, T2 v2) throws Exception;

Source Link

Usage

From source file:org.apache.crunch.fn.SFunctions.java

License:Apache License

public static <K, V, R> SFunction2<K, V, R> wrap(final Function2<K, V, R> f) {
    return new SFunction2<K, V, R>() {
        @Override/*from w  w  w.  j  a  v  a  2 s  .  c  o m*/
        public R call(K k, V v) throws Exception {
            return f.call(k, v);
        }
    };
}