title: Getting java enum by name
body: <p>Is it possible to get an enum by searching on its name instead of value ? For example :</p>
  
  <pre><code>public enum MyEnum {
      TOTO("some value", 1);
      ZOZO("some other value", 2);
  }    
  </code></pre>
  
  <p>And what I want to do is a getter like :</p>
  
  <pre><code>public static MyEnum getByName(String str) {
      [...]
  }
  </code></pre>
  
  <p>So I can do :</p>
  
  <pre><code>MyEnum foo = MyEnum.getByName("TOTO");
  MyEnum bar = MyEnum.getByName("ZOZO");
  </code></pre>