Friday, 23 August 2013

Java 8: Where is TriFunction (and kin) in java.util.function? Or what is the alternative?

Java 8: Where is TriFunction (and kin) in java.util.function? Or what is
the alternative?

I see java.util.function.BiFunction, so I can do this:
BiFunction<Integer, Integer, Integer> f = (x, y) -> { return 0; };
What if that is not good enough and I need TriFunction? It doesn't exist!
TriFunction<Integer, Integer, Integer, Integer> f = (x, y, z) -> { return
0; };

No comments:

Post a Comment