For example, with protocol buffers you end up doing things like.
AlbumCollection collection = user.getPreferences().getFavorites().getAlbums().toBuilder().addAlbum(album).build();
Favorites favorites = user.getPrefernces().getFavorties().toBuilder().setAlbumCollection(collection).build();
Preferences preferences = user.getPreferences().toBuilder().setFavorites(favorites).build();
and then you have to work your way up the chain of builders. Such a pain in the ass for something that could be much simpler with getters and setters.
user.addFavourite(album);You are right that normally you'd want the addFavourite method but in his example he is dealing with generated code which has a tendency towards verbosity.
You could add the method if Java allowed extension methods...
user.getPreferencesBuilder()
.getFavoritesBuilder()
.getAlbumsBuilder().addAlbum(album).build()That and good luck adding a new required field in your "constructor", because you just gave up on statically checking the parameters of the "constructor".
This is not a solution, this is a workaround.