View Javadoc
1   package com.puppycrawl.tools.checkstyle.grammars.java8;
2   import java.util.Arrays;
3   import java.util.List;
4   import java.util.function.Function;
5   import java.util.function.Supplier;
6   
7   
8   public class InputMethodReferences<T> extends ParentClass
9   {
10  
11      public void main(String[] args) {
12  		
13  		List<Integer> numbers = Arrays.asList(1,2,3,4,5,6);
14  		
15  		numbers.forEach(String.CASE_INSENSITIVE_ORDER::equals);
16  		InputMethodReferences tl = new InputMethodReferences();
17  
18  		String roster = new String();
19  		Supplier<InputMethodReferences> supplier = InputMethodReferences<String>::new;
20  
21  		numbers.forEach(this::println);
22  		
23  		numbers.forEach(super::println);
24          Supplier<InputMethodReferences2> supplier2 = InputMethodReferences2::new;
25          Supplier<InputMethodReferences2> suppl = InputMethodReferences2::<Integer> new;
26          Function<Integer, String[]> messageArrayFactory = String[]::new;
27  		
28  	}
29  }
30  
31  class ParentClass
32  {
33  
34      public String println(Integer i)
35      {
36          return null;
37      }
38  }