import java.util.function.IntFunction; import java.util.function.IntUnaryOperator; import java.util.function.Supplier; import java.util.stream.IntStream; import java.util.stream.Stream; class Test { interface IntStream1 { Stream map(IntFunction mapper); IntStream1 map(IntUnaryOperator mapper); Stream boxed(); } void fooBar(IntStream1 instr){ Supplier> si = () -> instr.map ((i) -> (( i % 2) == 0) ? i : -i).boxed(); System.out.println(si); Supplier> si1 = () -> instr.map (null).boxed(); System.out.println(si1); } } class TestInitial { void fooBar(){ Supplier> si = () -> IntStream.range(0, 20).map((i) -> ((i % 2) == 0) ? i : -i).boxed(); System.out.println(si); } }