title: Java enum instatiate using constructor parameter
body: <p>I have this enum:</p>
  
  <pre><code>    public enum Operation {
          ADD {
              public double apply(double a, double b) {
                  return a + b;
              }
          },
          SUBTRACT {
              public double apply(double a, double b) {
                  return a - b;
              }
          }
          } ;
  
          public abstract double apply(double a, double b);
  `}`
  </code></pre>
  
  <p>I  want to instantiate this like:</p>
  
  <pre><code>Operation op=new Operation("+");
  op.aply(2,3);//now use ADD
  </code></pre>
  
  <p>Is it possible to write a constructor with string parameter that tells to enum which operation to aply?</p>