The Java.util.EnumMap.containsValue(value) method in Java is used to determine whether one or more key of the map is associated with a given value or not. It takes the value as a parameter and returns True if that value is mapped by any of the keys in the EnumMap.
boolean containsValue(Object value)
Parameter: The method accepts one parameter value which refers to the value whose mapping is to be checked by any of the key.
Return Value: It returns true when one or more key is mapped to same value.
Below programs illustrate the containsValue() method:
Map contains 72: true
Map contains 2000: false
- EnumMap put() Method in Java
- EnumMap get() Method in Java
- EnumMap remove() Method in Java
- EnumMap entrySet() Method in Java
- EnumMap clone() Method in Java
- EnumMap containsKey() Method in Java
- EnumMap size() Method in Java
- EnumMap keySet() Method in Java
- EnumMap putAll(map) Method in Java
- EnumMap values() Method in Java
- EnumMap clear() Method in Java with Examples
- EnumMap equals() Method in Java with Examples
- EnumMap class in Java
- Method class isSynthetic() method in Java
- Method Class | getDeclaringClass() method in Java
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.