LongToDoubleFunction represents a function that accepts a long-valued argument and produces a double-valued result. This is the long-to-double primitive specialization for Function.
The following example shows how to use LongToDoubleFunction
.
import java.util.function.LongToDoubleFunction; // w w w . j a v a 2 s . com public class Main { public static void main(String[] args) { LongToDoubleFunction i = (l) -> Math.sin(l); System.out.println(i.applyAsDouble(Long.MAX_VALUE)); } }
The code above generates the following result.