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