It just returns an EmployeeEnricher
which basically is a Consumer<Builder>
(or a functional interface from the same kind) which does nothing with its parameter meaning that if the class implementing the interface doesn't @Override
this method, this will become its default behaviour (meaning nothing will happen).
In your application, you'll encounter different types of employees probably which will be enriched in different manners using a builder given in parameter using employeeEnricher().accept(builder)
This means implementation can mean two things for me :
Either the design is poor, and all employees should have their own implementation, meaning this interface's method should not have be default
but simply a classic abstract
method of the interface
Either some employees do not get enriched in the context of your application, and thus this method offers a default implementation making sense