Interface DataTreeCandidateNode
public interface DataTreeCandidateNode
A single node within a
DataTreeCandidate
. The nodes are organized in tree hierarchy, reflecting
the modification from which this candidate was created. The node itself exposes the before- and after-image
of the tree restricted to the modified nodes.-
Method Summary
Modifier and TypeMethodDescription@NonNull Collection<DataTreeCandidateNode>
Get an unmodifiable collection of modified child nodes.@NonNull Optional<NormalizedNode>
Return the after-image of data corresponding to the node.@NonNull Optional<NormalizedNode>
Return the before-image of data corresponding to the node.@NonNull YangInstanceIdentifier.PathArgument
Get the node identifier.@NonNull ModificationType
Return the type of modification this node is undergoing.@NonNull Optional<DataTreeCandidateNode>
getModifiedChild
(YangInstanceIdentifier.PathArgument childIdentifier) Returns modified child or empty.
-
Method Details
-
getIdentifier
@NonNull YangInstanceIdentifier.PathArgument getIdentifier()Get the node identifier.- Returns:
- The node identifier.
-
getChildNodes
@NonNull Collection<DataTreeCandidateNode> getChildNodes()Get an unmodifiable collection of modified child nodes. Note that the collection may includeModificationType.UNMODIFIED
nodes, which the caller is expected to handle as if they were not present.- Returns:
- Unmodifiable collection of modified child nodes.
-
getModifiedChild
@NonNull Optional<DataTreeCandidateNode> getModifiedChild(YangInstanceIdentifier.PathArgument childIdentifier) Returns modified child or empty. Note that this method may return anModificationType.UNMODIFIED
node when there is evidence of the node or its parent being involved in modification which has turned out not to modify the node's contents.- Parameters:
childIdentifier
- Identifier of child node- Returns:
- Modified child or empty.
- Throws:
NullPointerException
- ifchildIdentifier
is null
-
getModificationType
@NonNull ModificationType getModificationType()Return the type of modification this node is undergoing.- Returns:
- Node modification type.
-
getDataAfter
@NonNull Optional<NormalizedNode> getDataAfter()Return the after-image of data corresponding to the node.- Returns:
- Node data as they will be present in the tree after the modification is applied.
-
getDataBefore
@NonNull Optional<NormalizedNode> getDataBefore()Return the before-image of data corresponding to the node.- Returns:
- Node data as they were present in the tree before the modification was applied.
-