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.CandidateNodes, 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.CandidateNodeReturns modified child or empty.@Nullable DataTreeCandidate.CandidateNodeReturns 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.UNMODIFIEDnodes, 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.Unmodifiednode 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.PathArgumentof child node- Returns:
- Modified child or
nullif the specified child has not been modified - Throws:
NullPointerException- ifchildNamezisnull
-
findModifiedChild
default Optional<DataTreeCandidate.CandidateNode> findModifiedChild(YangInstanceIdentifier.PathArgument childName) Returns modified child or empty. Note that this method may return anDataTreeCandidate.CandidateNode.Unmodifiednode 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- ifchildIdentifierisnull- 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.Unmodifiednode 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- ifchildNameisnullVerifyException- if no modified child with specified name is found- Implementation Requirements:
- Default implementation defers to
modifiedChild(PathArgument).
-