I have a Treemap with some values, i.e.
TreeMap<Integer, Integer> map = new TreeMap<Integer, Integer>();
map.put(1,7);
map.put(6,3);
map.put(3,18);
map.put(7,2);
map.put(12,42);
How do I get the ID (12) by searching for the highest value(42) looking through the values of the map?