/** * You can use this method if you have an existing inventory structure and want to make modifications to it. * * @return a builder seeded with this inventory structure */ public InventoryStructure.Builder<Root> asBuilder() { RelativePath rootPath = EmptyRelativePath.I; Object attachment = getNode(rootPath).getAttachment(); return new InventoryStructure.Builder<>(root, attachment, EmptyRelativePath.I, entities, children); }
/** * You can use this method if you have an existing inventory structure and want to make modifications to it. * * @return a builder seeded with this inventory structure */ public InventoryStructure.Builder<Root> asBuilder() { RelativePath rootPath = EmptyRelativePath.I; Object attachment = getNode(rootPath).getAttachment(); return new InventoryStructure.Builder<>(root, attachment, EmptyRelativePath.I, entities, children); }