public void addSubNode(final NavNode subNode){
  subNodes.add(subNode);
  subNode.setParent(this);
  Collections.sort(subNodes,NODE_COMPARATOR);
}

public void addSubNode ( final NavNode subNode ) { subNodes . add ( subNode ) ; subNode . setParent ( this ) ; Collections . sort ( subNodes , NODE_COMPARATOR ) ; }
adds a sub node to this node . doing that the parent of subnode will be assigned to this node .
