+ this.value = new HashMap<>();
+ this.dirty = false;
+ }
+
+ protected AbstractImmutableDataContainerNodeBuilder(final AbstractImmutableDataContainerNode<I> node) {
+ this.value = node.getChildren();
+ this.dirty = true;
+ }
+
+ protected final I getNodeIdentifier() {
+ return nodeIdentifier;
+ }
+
+ protected final DataContainerChild<? extends PathArgument, ?> getChild(final PathArgument child) {
+ return value.get(child);
+ }
+
+ protected final Map<PathArgument, DataContainerChild<? extends PathArgument, ?>> buildValue() {
+ dirty = true;
+ return value;
+ }
+
+ private void checkDirty() {
+ if (dirty) {
+ value = new HashMap<>(value);
+ dirty = false;
+ }