Do not pretty-print body class
[yangtools.git] / data / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / DataTreeCandidate.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.data.api.schema.tree;
9
10 import org.eclipse.jdt.annotation.NonNullByDefault;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
13
14 /**
15  * An encapsulation of a validated data tree modification. This candidate
16  * is ready for atomic commit to the datastore. It allows access to before-
17  * and after-state as it will be seen in to subsequent commit. This capture
18  * can be accessed for reference, but cannot be modified and the content
19  * is limited to nodes which were affected by the modification from which
20  * this instance originated.
21  */
22 @NonNullByDefault
23 public interface DataTreeCandidate {
24     /**
25      * Get the candidate tree root node.
26      *
27      * @return Candidate tree root node
28      */
29     DataTreeCandidateNode getRootNode();
30
31     /**
32      * Get the candidate tree root path. This is the path of the root node
33      * relative to the root of InstanceIdentifier namespace.
34      *
35      * @return Relative path of the root node
36      */
37     YangInstanceIdentifier getRootPath();
38
39     /**
40      * {@inheritDoc}
41      *
42      * {@link DataTreeCandidate} implementations must not override the default identity hashCode method.
43      */
44     @Override
45     int hashCode();
46
47     /**
48      * {@inheritDoc}
49      *
50      * {@link DataTreeCandidate} implementations must not override the default identity hashCode method, meaning their
51      * equals implementation must result in identity comparison.
52      */
53     @Override
54     boolean equals(@Nullable Object obj);
55 }