Move Leaf(List)SchemaNode.getType() to a common interface
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / LeafSchemaNode.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.model.api;
9
10 /**
11  * Interface describing YANG <code>leaf</code> statement. The interface contains
12  * the methods for getting the following data (substatements of
13  * <code>leaf</code> statement)
14  * <ul>
15  * <li><code>type</code></li>
16  * <li><code>default</code></li>
17  * <li><code>units</code></li>
18  * </ul>
19  * <p>
20  * The 'leaf' statement is used to define a leaf node in the schema tree.
21  * </p>
22  */
23 public interface LeafSchemaNode extends TypedSchemaNode {
24     /**
25      * Returns the default value of YANG <code>leaf</code>.
26      *
27      * @return string with the value of the argument of YANG
28      *         <code>default</code> substatement of the <code>leaf</code>
29      *         statement
30      */
31     String getDefault();
32
33     /**
34      * Returns the units in which are the values of the <code>leaf</code>
35      * presented.
36      *
37      * @return string with the value of the argument of YANG <code>units</code>
38      *         substatement of the <code>leaf</code> statement
39      */
40     String getUnits();
41
42 }