2 * Copyright (c) 2015 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;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.base.MoreObjects;
13 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
16 * Default utility implementation of the {@link DataTreeCandidate} contract.
18 final class DefaultDataTreeCandidate implements DataTreeCandidate {
19 private final YangInstanceIdentifier rootPath;
20 private final DataTreeCandidateNode rootNode;
22 DefaultDataTreeCandidate(final YangInstanceIdentifier rootPath, final DataTreeCandidateNode rootNode) {
23 this.rootPath = requireNonNull(rootPath);
24 this.rootNode = requireNonNull(rootNode);
28 public DataTreeCandidateNode getRootNode() {
33 public YangInstanceIdentifier getRootPath() {
38 public String toString() {
39 return MoreObjects.toStringHelper(this).add("rootPath", getRootPath()).add("rootNode", getRootNode())