2 * Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.mdsal.dom.store.inmemory;
11 import com.google.common.collect.ImmutableMap;
13 import java.util.Map.Entry;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
16 abstract class WriteableNodeWithSubshard extends WriteableModificationNode {
18 private final Map<PathArgument, WriteableModificationNode> children;
20 WriteableNodeWithSubshard(Map<PathArgument, WriteableModificationNode> children) {
21 this.children = ImmutableMap.copyOf(children);
25 Map<PathArgument, WriteableModificationNode> getChildrenWithSubshards() {
30 WriteableModificationNode getChild(PathArgument node) {
31 return children.get(node);
36 for (Entry<PathArgument, WriteableModificationNode> child : children.entrySet()) {
37 child.getValue().markDeleted();