1//The Function type is declared as
2
3interface Function<T,R> {
4 R apply(T t);
5}
6//And the Consumer type is declared as
7
8interface Consumer<T> {
9 void accept(T t);
10}
11//Consumer is compatible with methods that receive
12//a T and return nothing (void).