ToLongBiFunction applyAsLong applies this function to the given arguments.
applyAsLong
has the following syntax.
long applyAsLong(T t, U u)
The following example shows how to use applyAsLong
.
import java.util.function.ToLongBiFunction; /*from w w w. j a va 2 s . c o m*/ 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.