title: Getting enum value by passing preset ordinal
body: <p>I have looked this link : <a href="https://stackoverflow.com/questions/609860/convert-from-enum-ordinal-to-enum-type/19277247#19277247">Convert from enum ordinal to enum type</a></p>
  
  <p>and tried to get the enum value. But is not working. My enum class is :</p>
  
  <pre><code>public enum OrderStatus {
  
      OPEN(0),
      DELIVERED(1),
      CANCELLED(3),
      PARTIALLY(4)
  }
  </code></pre>
  
  <p>I will pass the values 0,1,3,4 where 2 is missing , so it has no such order. How to get enum by passing 0,1,3 or 4 in groovy or java.</p>