title: Scala - Enumeration with value parametrized
body: <p>I'm wondering if its possible to have Enumerations with one value parametrized.</p>
  
  <p>Something like:</p>
  
  <pre><code>object Animal extends Enumeration {
    val Dog = Value("dog")
    val Cat = Value("cat")
    val Other = Value(?)
  
    def create(value: String): Animal.Value = {
      Animal.values.find(_.toString == value).getOrElse(Other(value))
    }
  }
  </code></pre>
  
  <p>And, for use, something like:</p>
  
  <pre><code>create("dog") // will return Animal.Dog
  create("giraffe") // will return Animal.Other
  create("dog").toString // will return "dog"
  create("giraffe").toString // will return "giraffe"
  </code></pre>
  
  <p>That is, to be able to have some values typed, but to leave one free.</p>
  
  <p>Thanks!!!
  Lucas.</p>