I have a situation as described below.
I do have Java Bean named Document
and it has various properties. One property is
String documentStatus
and I do have List<Document> documentList
. Then I do have List<String> statusList
.
Now, I want a list of all those documents whose documentStatus
are matching with given statusList
.
One solution is to iterate documentList
and match value using statusList.contains(document.getStatus())
.
Secondly, Predicates in Java
Apart from this can anyone have any ideas ?
Any Help would be really appreciated.