Ваши недостающие куски Function
и BiConsumer
// Equivalent to: Function<Foo, String> getter = foo -> foo.getBar();
Function<Foo, String> getter = Foo::getBar
// Equivalent to: BiConsumer<Foo, String> setter = (foo, str) -> foo.setBar(str);
BiConsumer<Foo, String> setter = Foo::setBar