UrlPartNode (@NotNull FilePartNode parent) { if (this instanceof UrlPartNode) return (UrlPartNode)this; if (this instanceof FilePartNodeRoot) throw new IllegalArgumentException("invalid argument node: " + this); UrlPartNode newNode = new UrlPartNode(getName().toString(), parent.myUrl(), myFS); newNode.children = children; newNode.replaceChildrenWithUPN(); processPointers(pointer -> newNode.addLeaf(pointer)); leaves = null; return newNode; }