title: How to implement an interface with an enum, where the interface extends Comparable?
body: <p>Consider this code:</p>
  
  <pre><code>public interface Foo extends Comparable&lt;Foo&gt; {}
  
  public enum FooImpl implements Foo {}
  </code></pre>
  
  <p>Due to the restrictions of type erasure, I receive the following error:</p>
  
  <blockquote>
    <p>java.lang.Comparable cannot be inherited with different arguments: <code>&lt;Foo&gt;</code> and <code>&lt;FooImpl&gt;</code></p>
  </blockquote>
  
  <p>I have the following requirements:</p>
  
  <ul>
  <li><code>FooImpl</code> needs to be an enum, because I need to use it as a default value in annotations.</li>
  <li>The contract of my interface is that it needs to be comparable.</li>
  </ul>
  
  <p>I already tried using generic bounds in the interface, but this is not supported in Java.</p>