Package me.datafox.dfxengine.utils
Class MapUtils
java.lang.Object
me.datafox.dfxengine.utils.MapUtils
Utilities for manipulating maps.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Map <V, K> reverseMap(Map<K, V> map) Reverses a map.
-
Constructor Details
-
MapUtils
public MapUtils()
-
-
Method Details
-
reverseMap
Reverses a map.- Type Parameters:
K- map key typeV- map value type- Parameters:
map- map to be reversed- Returns:
- map with all keys and values reversed
- Throws:
IllegalArgumentException- if the values of the map are not all distinct
-