2 * Copyright (c) 2014 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
8 package org.opendaylight.yangtools.yang.data.api.schema.tree.spi;
10 import com.google.common.base.MoreObjects.ToStringHelper;
11 import com.google.common.base.Optional;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
13 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
16 * A container node which has not seen a modification. All nodes underneath it share the same subtree version.
18 final class SimpleContainerNode extends AbstractContainerNode {
19 protected SimpleContainerNode(final NormalizedNode<?, ?> data, final Version version) {
24 public Version getSubtreeVersion() {
29 public Optional<TreeNode> getChild(final PathArgument child) {
30 return getChildFromData(child);
34 public MutableTreeNode mutable() {
35 return new LazyMutableContainerNode(this);
39 protected ToStringHelper addToStringAttributes(final ToStringHelper helper) {
40 return helper.add("data", getData());