When you have questions like these in the future, just FYI, google Java HashMap...you get a list of alltry to find the methods for hashmapsHashMap javadoc and can then you will be able to determine very quickly for yourself what to use.
In this case you wouldcan use containsKey()
Java containsKeyHashMap#containsKey(java.lang.Object) method
or if you want to find if the value inis in the hashmapHashMap, you can use containsValue()
Java containsValueHashMap#containsValue(java.lang.Object) method.