Un-deprecate CopyableNode, AddedByUsesAware
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / LeafListSchemaNode.java
index b6c2a6ec42102e7faf4dd75f9313ab06b134efc4..34828e19814b61aeef23a9f1c4cd865fe86c0c63 100644 (file)
@@ -7,28 +7,30 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
+import java.util.Collection;
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.yang.model.api.stmt.LeafListEffectiveStatement;
+
 /**
  * Interface describing YANG 'leaf-list' statement.
  */
-public interface LeafListSchemaNode extends DataSchemaNode {
-
-    /**
-     * Returns type of the instance which implements <code>DataSchemaNode</code>
-     * .
-     * 
-     * @return type definition of leaf-list schema node which represents the
-     *         value of the argument of the YANG <code>type</code> substatement
-     *         of the <code>leaf-list</code> statement
-     */
-    TypeDefinition<? extends TypeDefinition<?>> getType();
-
+public interface LeafListSchemaNode extends TypedDataSchemaNode, MustConstraintAware, ElementCountConstraintAware,
+        EffectiveStatementEquivalent<LeafListEffectiveStatement> {
     /**
      * YANG 'ordered-by' statement. It defines whether the order of entries
      * within this leaf-list are determined by the user or the system. If not
      * present, default is false.
-     * 
+     *
      * @return true if ordered-by argument is "user", false otherwise
      */
     boolean isUserOrdered();
 
+    /**
+     * Return the default value of this leaf-list, as per the rules outlined in
+     * <a href="https://tools.ietf.org/html/rfc7950#section-7.7.4">Section 7.4.4 of RFC7950</a>. RFC6020 does not
+     * allow for default value of leaf-list, hence the returned list will be empty.
+     *
+     * @return Ordered list of Strings which specify the default values of this leaf-list
+     */
+    @NonNull Collection<? extends Object> getDefaults();
 }