Where is the Java 8 Consumer with more than one argument?

Solution 1:

For 3 and more arguments you could use curried(http://en.wikipedia.org/wiki/Currying) functions with last consumer:

Function<Double, Function<Integer, Consumer<String>>> f = d -> i -> s -> {
            System.out.println("" + d+ ";" + i+ ";" + s); 
        };
f.apply(1.0).apply(2).accept("s");

Output is:

1.0;2;s

It's enough to have a function of one argument to express function of any number of arguments: https://en.wikipedia.org/wiki/Currying#Lambda_calculi

Solution 2:

By default you're limited with only java.util.function.Consumer and java.util.function.BiConsumer. They are sufficient for current java streaming API. But you can create your own functional interfaces that will receive as many arguments as you like and use it in your own custom APIs.