title: kotlin, how convert a EnumMap into regular Map
body: <p>need to call a api which take <code>Map&lt;String, String&gt;</code></p>
  
  <pre><code>fun api.log(map: Map&lt;string, String&gt;
  </code></pre>
  
  <p>but the key has to be only from the registered ones, so defined a enum for the registered keys:</p>
  
  <pre><code>enum class RegisteredKey {
      NONE, ZOOM
  }
  </code></pre>
  
  <p>and first build the EnumMap&lt;> to enforce key type:</p>
  
  <pre><code>var enumParamMap: EnumMap&lt;RegisteredKey, String&gt; = EnumMap&lt;RegisteredKey, String&gt;(RegisteredKey::class.java)
      enumParamMap.put(RegisteredKeys.NONE, "0")
      enumParamMap.put(RegisteredKeys.ZOOM, "1")
  
  doLog(enumParamMap)
  </code></pre>
  
  <p><strong>question 1, is there constructor to build the enumMap directly with data?</strong></p>
  
  <p>and then need to transform the EnumMap into a Map&lt;> so that the api.log() will accept it</p>
  
  <pre><code>fun doLog(enumParamMap: EnumMap&lt;RegisteredKey, String&gt;) {
  
      val map: MutableMap&lt;String, String&gt; = mutableMapOf()
  
      for (enum in enumParamMap.entries) {
          map.put(enum.key.name, enum.value)
      }
      api.log(map)
  }
  </code></pre>
  
  <p><strong>question 2:  is there simpler way to map the enumMap to regular map?</strong></p>