Interface MutableTreeNode

  • All Superinterfaces:
    StoreTreeNode<TreeNode>

    public interface MutableTreeNode
    extends StoreTreeNode<TreeNode>
    A mutable tree node. This is a transient view materialized from a pre-existing node. Modifications are isolated. Once this object is seal()ed, any interactions with it will result in undefined behavior.
    • Method Detail

      • setData

        void setData​(NormalizedNode data)
        Set the data component of the node.
        Parameters:
        data - New data component, may not be null.
        Throws:
        NullPointerException - if data is null
      • setSubtreeVersion

        void setSubtreeVersion​(Version subtreeVersion)
        Set the new subtree version. This is typically invoked when the user has modified some of this node's children.
        Parameters:
        subtreeVersion - New subtree version.
        Throws:
        NullPointerException - if subtreeVersion is null
      • putChild

        @Nullable TreeNode putChild​(TreeNode child)
        Add a new child node. This acts as add-or-replace operation, e.g. it succeeds even if a conflicting child is already present.
        Parameters:
        child - New child node.
        Returns:
        Replaced child, or null if there was no previous child
        Throws:
        NullPointerException - if child is null
      • removeChild

        @Nullable TreeNode removeChild​(YangInstanceIdentifier.PathArgument id)
        Remove a child node. This acts as delete-or-nothing operation, e.g. it succeeds even if the corresponding child is not present.
        Parameters:
        id - Child identifier.
        Returns:
        Removed child, or null if there was no matching child
        Throws:
        NullPointerException - if id is null
      • seal

        @NonNull TreeNode seal()
        Finish node modification and return a read-only view of this node. After this method is invoked, any further calls to this object's method result in undefined behavior.
        Returns:
        Read-only view of this node.