Interface DistinctNodeContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode>
-
- Type Parameters:
K
- Child path argument typeV
- Child Node type
- All Superinterfaces:
Identifiable<YangInstanceIdentifier.PathArgument>
,NormalizedNode
,NormalizedNodeContainer<V>
,OrderingAware
,PrettyTreeAware
- All Known Subinterfaces:
AugmentationNode
,ChoiceNode
,ContainerNode
,DataContainerNode
,LeafSetNode<T>
,MapEntryNode
,MapNode
,MountPointNode
,SystemLeafSetNode<T>
,SystemMapNode
,UnkeyedListEntryNode
,UserLeafSetNode<T>
,UserMapNode
- All Known Implementing Classes:
AbstractImmutableDataContainerNode
,ImmutableContainerNodeBuilder.ImmutableContainerNode
,ImmutableLeafSetNodeBuilder.ImmutableLeafSetNode
,ImmutableMapNodeBuilder.ImmutableMapNode
,ImmutableMountPointNode
,ImmutableUnkeyedListEntryNodeBuilder.ImmutableUnkeyedListEntryNode
,ImmutableUserLeafSetNodeBuilder.ImmutableUserLeafSetNode
,ImmutableUserMapNodeBuilder.ImmutableUserMapNode
public interface DistinctNodeContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode> extends NormalizedNodeContainer<V>
ANormalizedNodeContainer
which contains directly-addressable children. ItNormalizedNodeContainer does not have a value, but it has a child nodes. Definition of possible and valid child nodes is introduced in subclasses of this interface.
This interface should not be used directly, but rather use of of derived subclasses such as
DataContainerNode
,MapNode
,LeafSetNode
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.data.api.schema.OrderingAware
OrderingAware.System, OrderingAware.User
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Collection<@NonNull V>
body()
Returns the body of this node.@Nullable V
childByArg(K key)
Returns a child node identified by provided key.default Optional<V>
findChildByArg(K key)
Attempts to find a child node identified by provided key.default @NonNull V
getChildByArg(K key)
Returns a child node identified by provided key, asserting its presence.-
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode
contract, getIdentifier
-
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.NormalizedNodeContainer
isEmpty, size
-
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.OrderingAware
ordering
-
Methods inherited from interface org.opendaylight.yangtools.concepts.PrettyTreeAware
prettyTree
-
-
-
-
Method Detail
-
body
Collection<@NonNull V> body()
Returns the body of this node. While the return value specifiesObject
, this method's return value has further semantics. The returned object must be a well-published contract, such asString
,Collection<NormalizedNode>
orDOMSource
.Returns iteration of all child nodes. Order of returned child nodes may be defined by subinterfaces.
All nodes returned in this iterable, MUST also be accessible via
childByArg(PathArgument)
using their associated identifier.- Specified by:
body
in interfaceNormalizedNode
- Specified by:
body
in interfaceNormalizedNodeContainer<K extends YangInstanceIdentifier.PathArgument>
- Returns:
- Iteration of all child nodes
-
childByArg
@Nullable V childByArg(K key)
Returns a child node identified by provided key.- Parameters:
key
- Path argument identifying child node- Returns:
- Matching child node, or null if no matching child exists
- Throws:
NullPointerException
- ifkey
is null
-
findChildByArg
default Optional<V> findChildByArg(K key)
Attempts to find a child node identified by provided key.- Parameters:
key
- Path argument identifying child node- Returns:
- Optional with child node if child exists.
Optional.empty()
if child does not exist - Throws:
NullPointerException
- ifkey
is null
-
getChildByArg
default @NonNull V getChildByArg(K key)
Returns a child node identified by provided key, asserting its presence.- Parameters:
key
- Path argument identifying child node- Returns:
- Matching child node
- Throws:
NullPointerException
- ifkey
is nullVerifyException
- if the child does not exist
-
-