3a3f2d91a88e8d1668e5e7471c8f31972d3f33c7
[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 DataSchemaNode {
24
25     /**
26      * Returns the YANG <code>type</code> of the instance of the type
27      * <code>LeafSchemaNode</code>.
28      *
29      * @return type definition which represents the value of the YANG
30      *         <code>type</code> substatement for <code>leaf</code> statement
31      */
32     TypeDefinition<?> getType();
33
34     /**
35      * Returns the default value of YANG <code>leaf</code>.
36      *
37      * @return string with the value of the argument of YANG
38      *         <code>default</code> substatement of the <code>leaf</code>
39      *         statement
40      */
41     String getDefault();
42
43     /**
44      * Returns the units in which are the values of the <code>leaf</code>
45      * presented.
46      *
47      * @return string with the value of the argument of YANG <code>units</code>
48      *         substatement of the <code>leaf</code> statement
49      */
50     String getUnits();
51
52 }