MoveChange (RootEntry root, String path, String newParent) { Entry e = root.getEntry(path); MoveChange result = new MoveChange(nextId(), Paths.reparented(path, newParent), e.getParent().getPath()); e.getParent().removeChild(e); root.getEntry(newParent).addChild(e); return result; }