title: Method to accept any Enum and return all properties
body: <p>I have the following Enum where I would like to create a method that will accept an Enum object, and return a comma separated list of the properties of that Enum. So for the following Enum, my method would accept it as a parameter and <strong>return a String of "1, 2"</strong>.</p>
  
  <pre><code> public class typeEnum {
        public enum validTypes{
             TYPE1("1"),
             TYPE2("2");
  
        private String value;
  
        validTypes(String value) {
          this.value = value;
      }
  
      public String getValue() {
          return value;
      }
  
      public static boolean contains(String type) {
          for (validTypes msgType : validTypes.values()) {
              if (msgType.value.equals(type)) {
                  return true;
              }
          }
          return false;
      }
    }
   }
  </code></pre>
  
  <p>My expected method would be something like the following:</p>
  
  <pre><code> public static &lt;E extends Enum&lt;E&gt;, S extends String&gt; String enumPropsToString(E enumClazz, S value) {
   return ....
  }
  </code></pre>