ToLongBiFunction example
Description
ToLongBiFunction represents a function that accepts two arguments and produces a long-valued result. This is the long-producing primitive specialization for BiFunction.
Example
The following example shows how to use ToLongBiFunction
.
import java.util.function.ToLongBiFunction;
// ww w . j a v a 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.
Home »
Java Lambda »
java.util.function Reference »
Java Lambda »
java.util.function Reference »