class MemoryObjectTreeNode implements MutableTreeNode {

  @Override
  public void insert(MutableTreeNode newChild, int childIndex) {
    assert newChild instanceof MemoryObjectTreeNode;
    MemoryObjectTreeNode child = (MemoryObjectTreeNode)newChild;
    if (child.myParent != null && child.myParent != this) {
      child.myParent.remove(child);
    }
    child.setParent(this);
    myChildren.add(childIndex, child);
    myChildrenChanged = true;
  }

  public  MemoryObjectTreeNode(@NotNull T adapter);

}