1 package com.google.checkstyle.test.chapter4formatting.rule4841indentation;
2
3
4 public class InputClassWithChainedMethods {
5
6
7 public InputClassWithChainedMethods(Object... params) {}
8
9
10 public static void main(String[] args) {
11 new InputClassWithChainedMethods()
12 .getInstance("string_one")
13 .doNothing("string_one".trim(), "string_two");
14
15
16 String test =
17 new InputClassWithChainedMethods("param1", "param2").getInstance().doNothing("nothing");
18
19
20 String test2 =
21 new InputClassWithChainedMethods("param1", "param2").getInstance().doNothing("nothing");
22
23 }
24
25
26 public String doNothing(String something, String... uselessParams) {
27 return something;
28 }
29
30
31 public InputClassWithChainedMethods getInstance(String... uselessParams) {
32 return this;
33 }
34 }