Merge "Introduce Identifiables"
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / LeafNode.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;
9
10 import org.opendaylight.yangtools.yang.data.api.AttributesContainer;
11 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier.NodeIdentifier;
12
13 /**
14  *
15  * Leaf node with multiplicity 0..1
16  *
17  * Leaf node has a value, but no child nodes in the data tree, schema
18  * for leaf node and its value is described by {@link org.opendaylight.yangtools.yang.model.api.LeafSchemaNode}.
19  *
20  * @param <T> Value type
21  */
22 public interface LeafNode<T> extends //
23         AttributesContainer,
24         DataContainerChild<NodeIdentifier, T> {
25
26
27     /**
28      *
29      * Returns value of this leaf node
30      *
31      * @return Returned value of this leaf node. Value SHOULD meet criteria defined by schema.
32      *
33      */
34     @Override
35     T getValue();
36
37 }