How can I run some logic at the end instead of collect.
for(SomeObject someObj : someObjectList){
if (/*some test*/) {
if (/*more tests*/) {
// do logic like create new object with the filtered values and add to a list.
}
}
}
I can do like
someObjectList.streams().filter(test).filter(more tests).???
how can I run the logic at the end after filtering.
Thanks, Ravi