How to verify if a value in HashMap exist
问题 I have the following HashMap where the key is a String and the value is represented by an ArrayList : HashMap<String, ArrayList<String>> productsMap = AsyncUpload.getFoodMap(); I also have another ArrayList<String> foods implemented in my application. My question is, What would be the best way to find out if my HashMap contains a Specific String from my second ArrayList ? I have tried without success: Iterator<String> keySetIterator = productsMap.keySet().iterator(); Iterator<ArrayList<String