Disconnect NormalizedNode from Identifiable
[yangtools.git] / data / yang-data-impl / src / main / java / org / opendaylight / yangtools / yang / data / impl / schema / builder / impl / ImmutableLeafSetNodeBuilder.java
index 96f48c8b016abbf7f332a3e8d426766b7627f582..61ba04eac555ce761f46e08e7b8ec31b4376e5ce 100644 (file)
@@ -42,7 +42,7 @@ public class ImmutableLeafSetNodeBuilder<T> implements ListNodeBuilder<T, System
     }
 
     protected ImmutableLeafSetNodeBuilder(final ImmutableLeafSetNode<T> node) {
-        nodeIdentifier = node.getIdentifier();
+        nodeIdentifier = node.name();
         value = MapAdaptor.getDefaultInstance().takeSnapshot(node.children);
     }
 
@@ -63,13 +63,13 @@ public class ImmutableLeafSetNodeBuilder<T> implements ListNodeBuilder<T, System
 
     @Override
     public ImmutableLeafSetNodeBuilder<T> withChild(final LeafSetEntryNode<T> child) {
-        this.value.put(child.getIdentifier(), child);
+        value.put(child.name(), child);
         return this;
     }
 
     @Override
     public ImmutableLeafSetNodeBuilder<T> withoutChild(final PathArgument key) {
-        this.value.remove(key);
+        value.remove(key);
         return this;
     }
 
@@ -80,7 +80,7 @@ public class ImmutableLeafSetNodeBuilder<T> implements ListNodeBuilder<T, System
 
     @Override
     public ImmutableLeafSetNodeBuilder<T> withNodeIdentifier(final NodeIdentifier withNodeIdentifier) {
-        this.nodeIdentifier = withNodeIdentifier;
+        nodeIdentifier = withNodeIdentifier;
         return this;
     }
 
@@ -152,7 +152,7 @@ public class ImmutableLeafSetNodeBuilder<T> implements ListNodeBuilder<T, System
                 return false;
             }
             for (var child : children.values()) {
-                if (!child.equals(other.childByArg(child.getIdentifier()))) {
+                if (!child.equals(other.childByArg(child.name()))) {
                     return false;
                 }
             }