if (! allowsChildren) throw new IllegalStateException();
if (isNodeAncestor(child)) throw new IllegalArgumentException("Cannot add ancestor node.");
  public void add(MutableTreeNode child)  {    if (child == null)      throw new IllegalArgumentException();    if (! allowsChildren)      throw new IllegalStateException();    		children.add(child);		child.setParent(this);  }