DoubleFunction apply applies passed-in function to the given argument.
apply
has the following syntax.
R apply(double value)
The following example shows how to use apply
.
import java.util.function.DoubleFunction; //from ww w . j a v a 2s . c o m public class Main { public static void main(String[] args) { DoubleFunction<String> df = (d) -> d +" is now a string"; System.out.println(df.apply(0.5)); } }
The code above generates the following result.