Anything wrong with defining a java class with an array of elements of that class as one of its fields?
<p>My application model consists of disorders, each of which has innate attributes (id, name, incidence, etc.) and relationships to other disorders (e.g. risk factors, precipitating disorders, findings).  I've considered the following two object models:</p>

<p>The first: nested classes:</p>

<pre><code>class DiagnosticElement{
      Disorder disorder;
      List&lt;Disorder&gt; relatedDisorders;

      static class Disorder {
          int id;
          String name;
          double incidence;
          Disorder(id){
              this.id=id;
          }

    }
}
</code></pre>

<p>The second:</p>

<pre><code>class Disorder {
        int id;
        String name;
        double incidence;
        List&lt;Disorder&gt; relatedDisorders;

        Disorder(id){
            this.id=id;
            this.relatedDisorders=new ArrayList&lt;Disorder&gt;()
        }

    }
</code></pre>

<p>The second approach seems simpler.  Of course I must first instantiate Disorder objects before I can reference them in the ArrayList.  Is one approach better than the other?</p>
