+ + operation + ", childModification=" + children + "]";
+ }
+
+ void resolveModificationType(@Nonnull final ModificationType type) {
+ modType = type;
+ }
+
+ /**
+ * Update this node's value and operation type without disturbing any of its child modifications.
+ *
+ * @param type New operation type
+ * @param value New node value
+ */
+ void updateValue(final LogicalOperation type, final NormalizedNode<?, ?> value) {
+ this.value = Preconditions.checkNotNull(value);
+ updateOperationType(type);
+ }
+
+ /**
+ * Return the physical modification done to data. May return null if the
+ * operation has not been applied to the underlying tree. This is different
+ * from the logical operation in that it can actually be a no-op if the
+ * operation has no side-effects (like an empty merge on a container).
+ *
+ * @return Modification type.
+ */
+ ModificationType getModificationType() {
+ return modType;
+ }
+
+ public static ModifiedNode createUnmodified(final TreeNode metadataTree, final ChildTrackingPolicy childPolicy) {
+ return new ModifiedNode(metadataTree.getIdentifier(), Optional.of(metadataTree), childPolicy);
+ }
+
+ void setValidatedNode(final SchemaAwareApplyOperation op, final Optional<TreeNode> current, final TreeNode node) {
+ this.validatedOp = Preconditions.checkNotNull(op);
+ this.validatedCurrent = Preconditions.checkNotNull(current);
+ this.validatedNode = Preconditions.checkNotNull(node);