I have a
TreeMap map = new TreeMap();
to store values from documents in a view based on a selection criteria. map stores the creation date as the key and the document values as an object.
Within the object, I have a “form” field. documents can have different forms ( memo, notice, fax etc )
I have a method to return allEntries. That is ok and works as expected.
I now want to make a selection on the form field to return only a subset of the documents in the map.
Can someone point me into the right direction how to do this ?
Since the you want to select on something which is not the key of the map, you have to iterate over all the items.
If you can use external libraries, you could use
Collections2.filter()from google’s guava libraries. I.E.