Class ImmutableNodes
java.lang.Object
org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes
-
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull ChoiceNode
choiceNode
(QName name) Create an immutable choice node.static @NonNull ChoiceNode
Create an immutable choice node.static @NonNull ContainerNode
containerNode
(QName name) Create an immutable container node.static @NonNull ContainerNode
Create an immutable container node.static @NonNull NormalizedNode
Convert YangInstanceIdentifier into a normalized node structure.static <T> @NonNull LeafNode<T>
Construct immutable leaf node.static <T> @NonNull LeafNode<T>
leafNode
(YangInstanceIdentifier.NodeIdentifier name, T value) Construct immutable leaf node.static @NonNull UnkeyedListNode
Create an immutable list node.static @NonNull UnkeyedListNode
Create an immutable list node.static @NonNull MapEntryNode
static @NonNull DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifierWithPredicates,
MapEntryNode> static @NonNull DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifierWithPredicates,
MapEntryNode> mapEntryBuilder
(QName nodeName, QName keyName, Object keyValue) static @NonNull SystemMapNode
Create an immutable map node.static @NonNull SystemMapNode
Create an immutable map node.static @NonNull CollectionNodeBuilder<MapEntryNode,
SystemMapNode> static @NonNull CollectionNodeBuilder<MapEntryNode,
SystemMapNode> mapNodeBuilder
(QName name) static @NonNull CollectionNodeBuilder<MapEntryNode,
SystemMapNode> static @NonNull UserMapNode
orderedMapNode
(QName name) Create immutable ordered map node.static @NonNull UserMapNode
Create immutable ordered map node.
-
Method Details
-
mapNodeBuilder
-
mapNodeBuilder
-
mapNodeBuilder
public static @NonNull CollectionNodeBuilder<MapEntryNode,SystemMapNode> mapNodeBuilder(YangInstanceIdentifier.NodeIdentifier name) -
mapNode
Create an immutable map node.- Parameters:
name
- QName which will be used as node identifier- Returns:
- An unordered Map node
-
mapNode
Create an immutable map node.- Parameters:
name
- QName which will be used as node identifier- Returns:
- An unordered Map node
-
orderedMapNode
Create immutable ordered map node.- Parameters:
name
- QName which will be used as node identifier- Returns:
- An ordered Map node
-
orderedMapNode
Create immutable ordered map node.- Parameters:
name
- Node identifier- Returns:
- An ordered Map node
-
leafNode
public static <T> @NonNull LeafNode<T> leafNode(YangInstanceIdentifier.NodeIdentifier name, T value) Construct immutable leaf node.- Type Parameters:
T
- Type of leaf node value- Parameters:
name
- Identifier of leaf nodevalue
- Value of leaf node- Returns:
- Leaf node with supplied identifier and value
-
leafNode
Construct immutable leaf node.- Type Parameters:
T
- Type of leaf node value- Parameters:
name
- QName which will be used as node identifiervalue
- Value of leaf node.- Returns:
- Leaf node with supplied identifier and value
-
mapEntryBuilder
public static @NonNull DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifierWithPredicates,MapEntryNode> mapEntryBuilder(QName nodeName, QName keyName, Object keyValue) -
mapEntryBuilder
public static @NonNull DataContainerNodeBuilder<YangInstanceIdentifier.NodeIdentifierWithPredicates,MapEntryNode> mapEntryBuilder() -
mapEntry
-
containerNode
Create an immutable container node.- Parameters:
name
- QName which will be used as node identifier- Returns:
- A container node
-
containerNode
Create an immutable container node.- Parameters:
name
- Node identifier- Returns:
- A container node
-
choiceNode
Create an immutable choice node.- Parameters:
name
- QName which will be used as node identifier- Returns:
- A choice node
-
choiceNode
Create an immutable choice node.- Parameters:
name
- Node identifier- Returns:
- A choice node
-
listNode
Create an immutable list node.- Parameters:
name
- QName which will be used as node identifier- Returns:
- An unkeyed list node
-
listNode
Create an immutable list node.- Parameters:
name
- Node identifier- Returns:
- An unkeyed list node
-
fromInstanceId
public static @NonNull NormalizedNode fromInstanceId(EffectiveModelContext ctx, YangInstanceIdentifier id) Convert YangInstanceIdentifier into a normalized node structure.- Parameters:
ctx
- schema context to used during serializationid
- instance identifier to convert to node structure starting from root- Returns:
- serialized normalized node for provided instance Id
- Throws:
NullPointerException
- if any argument is nullIllegalArgumentException
- if the identifier cannot be converted
-