mshatunov
6/4/2018 - 2:55 PM

functions

Function<Integer, Integer> add2 = x -> x + 2;
Function<String, Integer> parseThenAdd2 = add2.compose(Integer::parseInt);
System.out.println(parseThenAdd2.apply("1"));
Comparator.thenComparing(Function<? super T,? extends U> keyExtractor)

//An instance method, also used in sorting, that adds an additional sorting mechanism if the collection has equal values by the first sort.