title: Get the name of enum based on the value
body: <p>I have the following enum</p>
  
  <pre><code>public enum AppointmentSlotStatusType {
  
      INACTIVE(0), ACTIVE(1);
  
      private int value;
  
      private AppointmentSlotStatusType(int value) {
          this.value = value;
      }
  
      public int getValue() {
          return value;
      }
  
      public String getName() {
          return name();
      }
  }
  </code></pre>
  
  <p>How do I get the enum name if a value is known for instance <code>1</code> ?</p>