title: Extending a enum in Java
body: <p>I have an enum, let's call it A:</p>
  
  <pre><code>public enum A
  {
      A,
      B
  }
  </code></pre>
  
  <p>I have a function that takes an enum A:</p>
  
  <pre><code>public void functionA(A enumA)
  {
      //do something
  }
  </code></pre>
  
  <p>How can I create another enum, possibly call B that I can pass to <strong>functionA</strong>? Something like this?</p>
  
  <pre><code>public enum B
  {
      C
  }
  
  functionA(B.C);
  </code></pre>
  
  <p>I know that you can't extend an enum, but what other options do I have available? What is the best way to achieve this?</p>