title: Tree (directed acyclic graph) implementation
body: <p>I require a tree / directed acyclic graph implementation something like this:</p>
  
  <pre><code>public class TreeNode&lt;K, V&gt; {
      private K key; // 'key' for this node, always present
      private V value; // 'value' for this node, doesn't have to be set
  
      private TreeNode&lt;K, V&gt; parent;
      private Set&lt;TreeNode&lt;K, V&gt;&gt; children; 
  }
  </code></pre>
  
  <ul>
  <li>There is no sorting of any kind. </li>
  <li>The <code>TreeNode</code> is just a wrapper around the key and a possible value (nodes don't have to have values set).</li>
  <li>I require links to both the parent and the children.</li>
  </ul>
  
  <p>Is there anything out there in the standard APIs or Commons etc that will do this for me?</p>
  
  <p>I don't mind writing it myself (and I'm certainly <strong>not</strong> asking you folks to) I just don't want to re-invent the wheel.</p>