View Javadoc
1   package com.google.checkstyle.test.chapter4formatting.rule4841indentation;
2   
3   /** some javadoc. */
4   public class InputFormattedClassWithChainedMethods {
5   
6     /** some javadoc. */
7     public InputFormattedClassWithChainedMethods(Object... params) {}
8   
9     /** some javadoc. */
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    /** some javadoc. */
27    public String doNothing(String something, String... uselessParams) {
28      return something;
29    }
30  
31    /** some javadoc. */
32    public InputFormattedClassWithChainedMethods getInstance(String... uselessParams) {
33      return this;
34    }
35  }