From: Robert Varga Date: Tue, 22 May 2018 00:42:04 +0000 (+0200) Subject: Expose ImmutableNodes.mapNodeBuilder(NodeIdentifier) X-Git-Tag: v2.0.5~10 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=8b3bd3b78f2e9730172dd8b2492522e25ec8ebd4;p=yangtools.git Expose ImmutableNodes.mapNodeBuilder(NodeIdentifier) This utility is useful for users who have a NodeIdentifier handy, bypassing NodeIdentifier.create(). Change-Id: I10f16ce5048ccb3b646761694b38f431447e09f2 Signed-off-by: Robert Varga --- diff --git a/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNodes.java b/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNodes.java index 7b8988d064..7d4f4a0f61 100644 --- a/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNodes.java +++ b/yang/yang-data-impl/src/main/java/org/opendaylight/yangtools/yang/data/impl/schema/ImmutableNodes.java @@ -42,7 +42,11 @@ public final class ImmutableNodes { } public static CollectionNodeBuilder mapNodeBuilder(final QName name) { - return ImmutableMapNodeBuilder.create().withNodeIdentifier(NodeIdentifier.create(name)); + return mapNodeBuilder(NodeIdentifier.create(name)); + } + + public static CollectionNodeBuilder mapNodeBuilder(final NodeIdentifier name) { + return ImmutableMapNodeBuilder.create().withNodeIdentifier(name); } /** @@ -68,7 +72,7 @@ public final class ImmutableNodes { * @param Type of leaf node value * @return Leaf node with supplied identifier and value */ - public static LeafNode leafNode(final QName name,final T value) { + public static LeafNode leafNode(final QName name, final T value) { return leafNode(NodeIdentifier.create(name), value); }