Package com.norconex.commons.lang.map
Class MapUtil
java.lang.Object
com.norconex.commons.lang.map.MapUtil
Map-related utility methods.
- Since:
- 2.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <K,V> Map <K, V> Converts a array of values to a map, alternating between key and values.static <K,V> void Populates an existing map with the array of values, alternating between key and values.
-
Method Details
-
toMap
Converts a array of values to a map, alternating between key and values.- Type Parameters:
K- map key typeV- map value type- Parameters:
values- to convert- Returns:
- the new map
-
toMap
Populates an existing map with the array of values, alternating between key and values.- Type Parameters:
K- map key typeV- map value type- Parameters:
map- the map to fill with valuesvalues- to convert
-