ToIntBiFunction represents a function that accepts two arguments and produces an int-valued result. This is the int-producing primitive specialization for BiFunction.
The following example shows how to use ToIntBiFunction
.
import java.util.function.ToIntBiFunction; /*w ww.j a va 2 s. co m*/ public class Main { public static void main(String[] args) { ToIntBiFunction<String,String> i = (x,y)-> Integer.parseInt(x) +Integer.parseInt(x); System.out.println(i.applyAsInt("2","3")); } }
The code above generates the following result.