BUG-4861: Make FractionDigitsStatement#getValue() return an int
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / LeafSchemaNode.java
index da1f7f56dfeff24bdf45ece67ef8e517a175a83a..37b2ef0744c0f5170400c6d74da11e7d2fd439f9 100644 (file)
@@ -20,6 +20,33 @@ package org.opendaylight.yangtools.yang.model.api;
  * The 'leaf' statement is used to define a leaf node in the schema tree.
  * </p>
  */
-public interface LeafSchemaNode extends SimpleValueSchemaNode {
+public interface LeafSchemaNode extends DataSchemaNode {
+
+    /**
+     * Returns the YANG <code>type</code> of the instance of the type
+     * <code>LeafSchemaNode</code>.
+     * 
+     * @return type definition which represents the value of the YANG
+     *         <code>type</code> substatement for <code>leaf</code> statement
+     */
+    TypeDefinition<?> getType();
+
+    /**
+     * Returns the default value of YANG <code>leaf</code>.
+     * 
+     * @return string with the value of the argument of YANG
+     *         <code>default</code> substatement of the <code>leaf</code>
+     *         statement
+     */
+    String getDefault();
+
+    /**
+     * Returns the units in which are the values of the <code>leaf</code>
+     * presented.
+     * 
+     * @return string with the value of the argument of YANG <code>units</code>
+     *         substatement of the <code>leaf</code> statement
+     */
+    String getUnits();
 
 }