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.controller.md.sal.dom.store.impl.tree.spi;
10 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.PathArgument;
11 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
13 import com.google.common.base.Preconditions;
14 import com.google.common.primitives.UnsignedLong;
17 * A very basic data tree node.
19 abstract class AbstractTreeNode implements TreeNode {
20 private final NormalizedNode<?, ?> data;
21 private final UnsignedLong version;
23 protected AbstractTreeNode(final NormalizedNode<?, ?> data, final UnsignedLong version) {
24 this.data = Preconditions.checkNotNull(data);
25 this.version = Preconditions.checkNotNull(version);
29 public PathArgument getIdentifier() {
30 return data.getIdentifier();
34 public final UnsignedLong getVersion() {
39 public final NormalizedNode<?, ?> getData() {