I have a HashMap "stateCityMap" which is a Map>. the Keys are the States ie Goa,Kerala etc and the Values are the Cities ie Panjim,Margao etc. I want to Check if a particular city is present in the HashMap, eg.Margao and give the corresponding key of that value as the result..but everytime i ran the below code.it performs the else part(when the city is not present in the HashMAp). 
city :- is the name of the city I pass to this function

Code:

```
  public String getState(Map<String, List<String>> stateCityMap, String city) throws CityNotFoundException {

    HashMap<String, List<String>> g = new HashMap<String, List<String>>(stateCityMap);

    if(g.containsValue(city)){

        System.out.println("State:- " +g.get(city));

    }
    else {
        throw new CityNotFoundException("City Not Found");
        }

    return null;
}

```

Why is it doing that? why am I getting the wrong result?