Class DataTreeCandidateNodes
java.lang.Object
org.opendaylight.yangtools.yang.data.tree.spi.DataTreeCandidateNodes
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyRootedNodeToCursor
(DataTreeModificationCursor cursor, YangInstanceIdentifier rootPath, DataTreeCandidateNode node) Applies thenode
that is rooted(doesn't have an identifier) in tree A to tree B'scursor
at location specified byrootPath
.static void
applyRootToCursor
(DataTreeModificationCursor cursor, DataTreeCandidateNode node) static void
applyToCursor
(DataTreeModificationCursor cursor, DataTreeCandidateNode node) Applies thenode
to thecursor
, note that if the top node of (@code node} is RootNode you need to useapplyRootedNodeToCursor
method that works with rooted node candidates.static @NonNull Collection<DataTreeCandidateNode>
containerDelta
(@Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> oldData, @Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> newData) Return a collection ofDataTreeCandidateNode
s summarizing the changes between the contents of twoNormalizedNodeContainer
s.static @Nullable DataTreeCandidateNode
containerDelta
(@Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> oldData, @Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> newData, @NonNull YangInstanceIdentifier.PathArgument child) Return a collection ofDataTreeCandidateNode
s summarizing the change in a child, identified by aYangInstanceIdentifier.PathArgument
, between twoNormalizedNodeContainer
s.static @NonNull DataTreeCandidateNode
empty
(YangInstanceIdentifier.PathArgument identifier) Return an emptyDataTreeCandidateNode
identified by specifiedYangInstanceIdentifier.PathArgument
.static @NonNull DataTreeCandidateNode
unmodified
(NormalizedNode node) Return an unmodifiedDataTreeCandidateNode
identified by specifiedNormalizedNode
.static @NonNull DataTreeCandidateNode
written
(NormalizedNode node) Return aDataTreeCandidateNode
pretending specified node was written without the data exsting beforehand.
-
Method Details
-
empty
Return an emptyDataTreeCandidateNode
identified by specifiedYangInstanceIdentifier.PathArgument
.- Parameters:
identifier
- Node identifier- Returns:
- An empty DataTreeCandidateNode
-
unmodified
Return an unmodifiedDataTreeCandidateNode
identified by specifiedNormalizedNode
.- Parameters:
node
- Unchanged normalized node- Returns:
- An empty DataTreeCandidateNode
-
written
Return aDataTreeCandidateNode
pretending specified node was written without the data exsting beforehand.- Parameters:
node
- Unchanged normalized node- Returns:
- An empty DataTreeCandidateNode
- Throws:
NullPointerException
- ifnode
is null
-
containerDelta
public static @NonNull Collection<DataTreeCandidateNode> containerDelta(@Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> oldData, @Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> newData) Return a collection ofDataTreeCandidateNode
s summarizing the changes between the contents of twoNormalizedNodeContainer
s.- Parameters:
oldData
- Old data container, may be nullnewData
- New data container, may be null- Returns:
- Collection of changes
-
containerDelta
public static @Nullable DataTreeCandidateNode containerDelta(@Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> oldData, @Nullable DistinctNodeContainer<YangInstanceIdentifier.PathArgument, NormalizedNode> newData, @NonNull YangInstanceIdentifier.PathArgument child) Return a collection ofDataTreeCandidateNode
s summarizing the change in a child, identified by aYangInstanceIdentifier.PathArgument
, between twoNormalizedNodeContainer
s.- Parameters:
oldData
- Old data container, may be nullnewData
- New data container, may be null- Returns:
- A
DataTreeCandidateNode
describing the change, or empty if the node is not present
-
applyToCursor
Applies thenode
to thecursor
, note that if the top node of (@code node} is RootNode you need to useapplyRootedNodeToCursor
method that works with rooted node candidates.- Parameters:
cursor
- cursor from the modification we want to apply thenode
tonode
- candidate tree to apply
-
applyRootedNodeToCursor
public static void applyRootedNodeToCursor(DataTreeModificationCursor cursor, YangInstanceIdentifier rootPath, DataTreeCandidateNode node) Applies thenode
that is rooted(doesn't have an identifier) in tree A to tree B'scursor
at location specified byrootPath
.- Parameters:
cursor
- cursor from the modification we want to apply thenode
torootPath
- path in thecursor
's tree we want to apply to candidate tonode
- candidate tree to apply
-
applyRootToCursor
-