반응형 Map to MultiValueMap1 [Kotlin] MultiValueMap to Map, Map to MultiValueMap, Object to MultiValueMap MultiValueMap to Map @Test fun multiValueMapToMap() { val multiValueMap = LinkedMultiValueMap() multiValueMap["a"] = "a" multiValueMap["b"] = "b" multiValueMap["c"] = "c" val map = multiValueMap.entries.associate { it.key to it.value[0] } println(map) // {a=a, b=b, c=c} } Map to MultiValueMap @Test fun mapToMultiValueMap() { val map = HashMap() map["a"] = "a" map["b"] = "b" map["c"] = "c" val mu.. 2021. 10. 15. 이전 1 다음 반응형