Right. I can admit I am still not comfortable with all the functional stuff so booboo me. But I do slowly find that Streams are handy for some applications, especially when written clearly.
Still, I find streams confusing, and looking at your link, you seem to have left out the Employee type parameter for the Optional, making it even more confusing. After reading the link, I get the idea, which is kind of nice in theory.
But I still don't quite get the point of this example. You apply the .flatMap() "transformation" on single items just to avoid null checks? It seems to be chaining of calls for methods that returns single values but might not be there.So, Employee only has one primary address but you call those flatMaps on Optionals just to avoid null checks on the returns?
I thought streams were for handling collections using some fancy new syntax to make us all nerds happy about another new toy for the same thing. The one someone else wrote on this thread about firing code monkeys made a lot more sense to me.