1
2 package com.puppycrawl.tools.checkstyle.checks.indentation.indentation;
3
4 import java.util.function.BinaryOperator;
5 import java.util.function.Consumer;
6
7
8 public class InputIndentationLambda2 {
9 public <T> Consumer<Integer> par(Consumer<Integer> f1, Consumer<Integer> f2) {
10 return f2;
11 }
12
13 private void print(int i) {
14 }
15
16 public Consumer<Integer> returnFunctionOfLambda() {
17 return par(
18 (x) -> print(x * 1),
19 (x) -> print(x * 2)
20 );
21 }
22
23 public static <T> BinaryOperator<T> returnLambda() {
24 return (t1, t2) -> {
25 return t1;
26 };
27 }
28
29 class TwoParams {
30 TwoParams(Consumer<Integer> c1, Consumer<Integer> c2) {
31 }
32 }
33
34 public void makeTwoParams() {
35 TwoParams t0 = new TwoParams(
36 (x) -> print(x * 1),
37 (x) -> print(x * 2)
38 );
39
40 TwoParams t1 = new TwoParams(
41 (x) -> print(x * 1),
42 (x) -> print(x * 2));
43 }
44 }