title: Can an implementation of an enum that is a Function be expressed using a lambda?
body: <p>Suppose I want to create a set of related functions and want to group them in an enum.</p>
  
  <p>I can code, just for example:</p>
  
  <pre><code>enum Case implements Function&lt;Object, String&gt; {
      UPPER {
          public String apply(Object o) {
              return o.toString().toUpperCase();
          }
      },
      LOWER {
          public String apply(Object o) {
              return o.toString().toLowerCase();
          }
      }
  }
  </code></pre>
  
  <p>I would like to be able to code this as a lambda, something like (but doesn't compile):</p>
  
  <pre><code>enum CaseLambda implements Function&lt;Object, String&gt; {
      UPPER (o -&gt; o.toString().toUpperCase()),
      LOWER (o -&gt; o.toString().toLowerCase())
  }
  </code></pre>
  
  <p>I've tried a few variations of brackets etc, but nothing compiles.</p>
  
  <p><strong>Is there a syntax that allows the declaration of enum instance implementation as lambda?</strong></p>