Propagate @NonNull collection annotations
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / DeviateDefinition.java
index d77c03b547cfee53d1f17a09b83172300c556526..fbe8b2674312b857e8bc4bef6926fe545de9e94e 100644 (file)
@@ -5,12 +5,13 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.yangtools.yang.model.api;
 
 import com.google.common.annotations.Beta;
 import java.util.Collection;
-import java.util.Set;
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.yangtools.yang.model.api.stmt.DeviateEffectiveStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.UniqueEffectiveStatement;
 
 /**
  * Interface describing YANG 'deviate' statement.
@@ -21,7 +22,7 @@ import java.util.Set;
  * The argument is one of the strings "not-supported", "add", "replace", or "delete".
  */
 @Beta
-public interface DeviateDefinition {
+public interface DeviateDefinition extends EffectiveStatementEquivalent<DeviateEffectiveStatement> {
     /**
      * Return deviation kind.
      *
@@ -69,7 +70,7 @@ public interface DeviateDefinition {
      *
      * @return set of the deviated must statements
      */
-    Set<MustDefinition> getDeviatedMusts();
+    Collection<? extends @NonNull MustDefinition> getDeviatedMusts();
 
     /**
      * Returns deviated type statement.
@@ -83,7 +84,7 @@ public interface DeviateDefinition {
      *
      * @return collection of the deviated unique statements
      */
-    Collection<UniqueConstraint> getDeviatedUniques();
+    Collection<? extends @NonNull UniqueEffectiveStatement> getDeviatedUniques();
 
     /**
      * Returns deviated units statement.