What is the best Object based data structure for this hierarchy?
<p>What is the best Object based data structure for this hierarchy </p>

<pre><code>"text1"
   |---&gt; "text2"
            |-----&gt; List of objs
</code></pre>

<p>I could do something like </p>

<pre><code>class Test(){
      String text1;
      HashMap&lt;String,List&lt;Obj&gt;&gt; text2ListOfObjs;
}
</code></pre>

<p>The consumer of this class would do something like </p>

<pre><code>for(Test test: tests){
   iterate over hashmap
      ....
}
</code></pre>

<p>Any other suggestions ?</p>
