The TreeLink class

The links are represented by instances of a very simple class that just holds references to the parent and child tree nodes, see the following code example.
public class TreeLink
{
  private Object parentNode;
  private Object childNode;

  public TreeLink(Object parentNode, Object childNode)
  {
    this.parentNode = parentNode;
    this.childNode = childNode;
  }

  public Object getParentNode()
  {
    return parentNode;
  }

  public Object getChildNode()
  {
    return childNode;
  }
}