*/
package org.opendaylight.yangtools.yang.model.api;
-import com.google.common.collect.ImmutableList;
import java.util.Collection;
-import javax.annotation.Nonnull;
+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 TypedSchemaNode {
+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
boolean isUserOrdered();
/**
- * All implementations should override this method.
- * The default definition of this method is used only in YANG 1.0 (RFC6020) implementation of
- * LeafListSchemaNode which does not support default statements.
- * YANG leaf-list statement has been changed in YANG 1.1 (RFC7950) and now allows default statements.
+ * 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 collection of Strings which specify the default values of this leaf-list
+ * @return Ordered list of Strings which specify the default values of this leaf-list
*/
- // FIXME: version 2.0.0: make this method non-default
- @Nonnull default Collection<String> getDefaults() {
- return ImmutableList.of();
- }
+ @NonNull Collection<? extends Object> getDefaults();
}