ToLongBiFunction represents a function that accepts two arguments and produces a long-valued result. This is the long-producing primitive specialization for BiFunction.
The following example shows how to use ToLongBiFunction
.
import java.util.function.ToLongBiFunction; //ww w. ja va 2s. c om public class Main { public static void main(String[] args) { ToLongBiFunction<String,String> i = (x,y)-> Long.parseLong(x)+Long.parseLong(y); System.out.println(i.applyAsLong("2","2")); } }
The code above generates the following result.