Java 8 streams API

My experience with querying a collection has always been clumsy. Writing iterative loops, adding nested if conditions and above all the hack of maintaining intermediary collection to store results. On top of that the brutal indicators from SonarQube – cyclomatic complexity. During all this, I felt there is a common pattern for filtering, sorting and there has to be an expressive way to achieve this functionality(someone said more like SQL!!!). With my love towards multiple technologies (Ok I accept I am a polyglot coder), I knew .Net already had an answer to this – LINQ. Simply have a collection and write a query to extract data. Something like below
Continue reading