* 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> {
+public abstract class MutableTreeNode implements 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);
+ public abstract void setData(NormalizedNode data);
/**
* Set the new subtree version. This is typically invoked when the user
* @param subtreeVersion New subtree version.
* @throws NullPointerException if {@code subtreeVersion} is null
*/
- void setSubtreeVersion(Version subtreeVersion);
+ public abstract void setSubtreeVersion(Version subtreeVersion);
/**
* Add a new child node. This acts as add-or-replace operation, e.g. it succeeds even if a conflicting child is
* @return Replaced child, or null if there was no previous child
* @throws NullPointerException if {@code child} is null
*/
- @Nullable TreeNode putChild(TreeNode child);
+ public abstract @Nullable TreeNode putChild(TreeNode child);
/**
* Remove a child node. This acts as delete-or-nothing operation, e.g. it succeeds even if the corresponding child
* @return Removed child, or null if there was no matching child
* @throws NullPointerException if {@code id} is null
*/
- @Nullable TreeNode removeChild(PathArgument id);
+ public abstract @Nullable TreeNode removeChild(PathArgument id);
/**
* Finish node modification and return a read-only view of this node. After
*
* @return Read-only view of this node.
*/
- @NonNull TreeNode seal();
+ public abstract @NonNull TreeNode seal();
}