Yes, never use value part of the map (integer). Also it can be replaced by list. 
However, using list, searching loaded list will take O(n), but with Map, it takes O(logn).
This is the only reason i use map instead of list.