Merge "BUG-1201: make yangtools compilable with java 8."
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / Node.java
1 /*
2  * Copyright (c) 2013 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;
9
10 import java.util.Map.Entry;
11
12 import org.opendaylight.yangtools.yang.common.QName;
13
14 /**
15  * Base representation of node in the data tree, defines basic parameters of
16  * node such as a QName.
17  *
18  *
19  * @param <T>
20  */
21 public interface Node<T> extends Entry<QName, T> {
22
23     /**
24      * Returns the name of the Node
25      *
26      * @return qName of node
27      */
28     QName getNodeType();
29
30     /**
31      * Returns parent node
32      *
33      * @return parent node
34      * @deprecated Unused, Deprecated because  reference to parent disallows of sharing one instance
35      *   in multiple trees / subtress.
36      */
37     @Deprecated
38     CompositeNode getParent();
39
40     /**
41      * Returns the value that holds current node, if no value is defined method
42      * can return <code>null</code>
43      *
44      * @return Returns the value that holds current node.
45      */
46     @Override
47     T getValue();
48 }