0

I need to search if exist one Integer in the values of a TreeMap<String, List<Integer>>, how I can do it?

I need to search a particular integer value in all of the lists.

campanoon
  • 41
  • 1
  • 9
  • You'll have to explore up to every entry in the map. You could consider doing so by iterating over its `values()` collection. – John Bollinger Mar 01 '17 at 21:39
  • Do you want to know if there is a) exactly one integer value in total (i.e. all lists empty except one list which contains one integer) or b) a particular integer value in any of the lists or c) a particular integer value in all of the lists? – Markus Benko Mar 01 '17 at 21:41
  • Use Guava MultiMaps and create your Bidirectional collection. Look at the example [here](http://stackoverflow.com/a/39846050/7022735) – rvit34 Mar 01 '17 at 21:42
  • I need to search a particular integer value in all of the lists. – campanoon Mar 01 '17 at 21:45

0 Answers0