ToDoubleBiFunction example
Description
ToDoubleBiFunction represents a function that accepts two arguments and produces a double-valued result. This is the double-producing primitive specialization for BiFunction.
Example
The following example shows how to use ToDoubleBiFunction
.
import java.util.function.ToDoubleBiFunction;
// w w w . j av a2 s . c o m
public class Main {
public static void main(String[] args) {
ToDoubleBiFunction<Integer,Long> i = (x,y)-> Math.sin(x)+Math.sin(y);
System.out.println(i.applyAsDouble(Integer.MAX_VALUE, Long.MAX_VALUE));
}
}
The code above generates the following result.
Home »
Java Lambda »
java.util.function Reference »
Java Lambda »
java.util.function Reference »