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.tree.api;
10 import org.eclipse.jdt.annotation.NonNullByDefault;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15 * An encapsulation of a validated data tree modification. This candidate is ready for atomic commit to the datastore.
16 * It allows access to before- and after-state as it will be seen in to subsequent commit. This capture can be accessed
17 * for reference, but cannot be modified and the content is limited to nodes which were affected by the modification
18 * from which this instance originated.
21 public interface DataTreeCandidate {
23 * Get the candidate tree root node.
25 * @return Candidate tree root node
27 DataTreeCandidateNode getRootNode();
30 * Get the candidate tree root path. This is the path of the root node
31 * relative to the root of InstanceIdentifier namespace.
33 * @return Relative path of the root node
35 YangInstanceIdentifier getRootPath();
40 * {@link DataTreeCandidate} implementations must not override the default identity hashCode method.
48 * {@link DataTreeCandidate} implementations must not override the default identity hashCode method, meaning their
49 * equals implementation must result in identity comparison.
52 boolean equals(@Nullable Object obj);