title: Get enum constant using its value
body: <p>Im trying to get enum using its value but it throws an error saying <code>No enum constant</code>. The eg code is in Kotlin but it is same in Java Thanks in advance.</p>
  
  <pre><code>import java.util.*
  
  enum class TaskAction constructor(val value: String) {
      ARCHIVE("Archive"), UN_FLAG("Un flag"), FLAG("Flag"), REDO("Redo"),
      READY("Ready"), EDIT("Edit"), DND("dnd"), DELETE("Delete"),
      IN_PROGRESS("In progress"), DONE("Done");
  }
  
  
  fun main(args: Array&lt;String&gt;) {
      showSomeThing(TaskAction.UN_FLAG.value)
  }
  
  fun showSomeThing(enum: String) {
      println(TaskAction.valueOf(enum))
  }
  </code></pre>
  
  <p>Log:</p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.IllegalArgumentException: No enum
    constant TaskAction.Un flag</p>
  </blockquote>