Interface DataTreeCandidate.CandidateNode.WithChildren
- All Known Subinterfaces:
DataTreeCandidate.CandidateNode.Appeared
,DataTreeCandidate.CandidateNode.Disappeared
,DataTreeCandidate.CandidateNode.Modified
- Enclosing interface:
DataTreeCandidate.CandidateNode
public static sealed interface DataTreeCandidate.CandidateNode.WithChildren
permits DataTreeCandidate.CandidateNode.Appeared, DataTreeCandidate.CandidateNode.Disappeared, DataTreeCandidate.CandidateNode.Modified
A non-terminal
DataTreeCandidate.CandidateNode
which has some child DataTreeCandidate.CandidateNode
s, which have collectively
contributed to this node's existence.-
Method Summary
Modifier and TypeMethodDescriptionchildren()
Get an unmodifiable collection of modified child nodes.default Optional
<DataTreeCandidate.CandidateNode> Returns modified child or empty.default DataTreeCandidate.CandidateNode
Returns modified child or empty.@Nullable DataTreeCandidate.CandidateNode
Returns modified child or empty.
-
Method Details
-
children
Collection<DataTreeCandidate.CandidateNode> children()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.
-
modifiedChild
Returns modified child or empty. Note that this method may return anDataTreeCandidate.CandidateNode.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:
arg
-YangInstanceIdentifier.PathArgument
of child node- Returns:
- Modified child or
null
if the specified child has not been modified - Throws:
NullPointerException
- ifchildNamez
isnull
-
findModifiedChild
default Optional<DataTreeCandidate.CandidateNode> findModifiedChild(YangInstanceIdentifier.PathArgument childName) Returns modified child or empty. Note that this method may return anDataTreeCandidate.CandidateNode.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:
childName
- Identifier of child node- Returns:
- Modified child or empty.
- Throws:
NullPointerException
- ifchildIdentifier
isnull
- Implementation Requirements:
- Default implementation defers to
Optional.ofNullable(Object)
based onmodifiedChild(PathArgument)
.
-
getModifiedChild
default DataTreeCandidate.CandidateNode getModifiedChild(YangInstanceIdentifier.PathArgument childName) Returns modified child or empty. Note that this method may return anDataTreeCandidate.CandidateNode.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:
childName
- Identifier of child node- Returns:
- Modified child
- Throws:
NullPointerException
- ifchildName
isnull
VerifyException
- if no modified child with specified name is found- Implementation Requirements:
- Default implementation defers to
modifiedChild(PathArgument)
.
-