title: How do I create a generic method to return an array of the enum values instead of its constants?
body: <p>I have an enum with descriptions as String. This is the enum.</p>
  
  <pre><code>public enum tabs
  {
      A("Actual data"),
      B("Bad data"),
      C("Can data"),
      D("Direct data");
  
      private String description;
      tabs(String desc)
      {
          this.description = desc;
      }
  
  
      public String getDescription()
      {
          return this.description;
      }
  }
  </code></pre>
  
  <p>Now, if I need the data for A, I'd just do </p>
  
  <pre><code>tabs.A.description
  </code></pre>
  
  <p>I am in the process of creating a generic method to return the values. </p>
  
  <p>I have managed to utilize the below generic method to accept an enum type as the argument. 
  It returns an array of the enum constants. 
  But I actually want it to return an array of the values.. ie {"Actual data", "Bad data", "Can data", "Direct data"}.</p>
  
  <pre><code>public static String[] getActualTabs(Class&lt;? extends Enum&lt;?&gt;&gt; e) 
  {
      return Arrays.stream(e.getEnumConstants()).map(Enum::name).toArray(String[]::new);
  }
  </code></pre>
  
  <p>What options do I have to achieve this?</p>