title: Enforcing parameter types on dependent interfaces?
body: <p>These interfaces are very simple:</p>
  
  <pre><code>public interface Thawed&lt;F&gt;
  {
      F freeze();
  }
  
  public interface Frozen&lt;T&gt;
  {
      T thaw();
  }
  </code></pre>
  
  <p>This works, no problem.</p>
  
  <p>But now, how would I require <code>F</code> in <code>Thawed</code> to implement <code>Frozen</code>, and <code>T</code> in <code>Frozen</code> to implement <code>Thawed</code>?</p>
  
  <p>The closest I could get is:</p>
  
  <pre><code>public interface Thawed&lt;F extends Frozen&lt;? extends Thawed&lt;F&gt;&gt;&gt;
  
  public interface Frozen&lt;T extends Thawed&lt;? extends Frozen&lt;T&gt;&gt;&gt;
  </code></pre>
  
  <p>But that sounds quite recursive... (also works with <code>Thawed&lt;?&gt;</code> and <code>Frozen&lt;?&gt;</code>)</p>