Class reference within a class
<p>Is it valid to have a class structure like this:</p>

<pre><code>public class MyClass {
   private Key&lt;MyClass&gt; key = null;
   // such that I can:
   public Key&lt;MyClass&gt; getKey() {
     return this.key;
   }
   public void setKey(Key&lt;MyClass&gt; key) {
     this.key = key;
   }
}
</code></pre>

<p>Such that, I can set the key:</p>

<pre><code>Key&lt;MyClass&gt; key = put(entity); // entity is an instance of MyClass
entity.setKey(key); 
</code></pre>
