Push out FIXMEs to 6.0.0
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / schema / tree / spi / MutableTreeNode.java
index 761143778184096936ca9132702b996a1bd9eaef..432d1f2782bfdbea2a111afbcddeb20d6c5587c4 100644 (file)
@@ -7,21 +7,21 @@
  */
 package org.opendaylight.yangtools.yang.data.api.schema.tree.spi;
 
-
+import org.eclipse.jdt.annotation.NonNull;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 import org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode;
 
 /**
- * A mutable tree node. This is a transient view materialized from a pre-existing
- * node. Modifications are isolated. Once this object is {@link #seal()}-ed,
- * any interactions with it will result in undefined behavior.
+ * A mutable tree node. This is a transient view materialized from a pre-existing node. Modifications are isolated. Once
+ * this object is {@link #seal()}ed, any interactions with it will result in undefined behavior.
  */
 public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
     /**
      * Set the data component of the node.
      *
      * @param data New data component, may not be null.
+     * @throws NullPointerException if {@code data} is null
      */
     void setData(NormalizedNode<?, ?> data);
 
@@ -30,6 +30,7 @@ public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
      * has modified some of this node's children.
      *
      * @param subtreeVersion New subtree version.
+     * @throws NullPointerException if {@code subtreeVersion} is null
      */
     void setSubtreeVersion(Version subtreeVersion);
 
@@ -38,6 +39,7 @@ public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
      * succeeds even if a conflicting child is already present.
      *
      * @param child New child node.
+     * @throws NullPointerException if {@code child} is null
      */
     void addChild(TreeNode child);
 
@@ -45,7 +47,8 @@ public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
      * Remove a child node. This acts as delete-or-nothing operation, e.g. it
      * succeeds even if the corresponding child is not present.
      *
-     * @param id Child identificator.
+     * @param id Child identifier.
+     * @throws NullPointerException if {@code id} is null
      */
     void removeChild(PathArgument id);
 
@@ -56,5 +59,5 @@ public interface MutableTreeNode extends StoreTreeNode<TreeNode> {
      *
      * @return Read-only view of this node.
      */
-    TreeNode seal();
+    @NonNull TreeNode seal();
 }