Interface DistinctContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode>
- Type Parameters:
K
- Child path argument typeV
- Child Node type
- All Superinterfaces:
NormalizedContainer<V>
,NormalizedData
,OrderingAware
- All Known Subinterfaces:
ChoiceNode
,ContainerNode
,DataContainer
,DataContainerNode
,DistinctNodeContainer<K,
,V> LeafSetNode<T>
,MapEntryNode
,MapNode
,NormalizedYangData
,SystemLeafSetNode<T>
,SystemMapNode
,UnkeyedListEntryNode
,UserLeafSetNode<T>
,UserMapNode
- All Known Implementing Classes:
AbstractImmutableDataContainerNode
,ImmutableContainerNodeBuilder.ImmutableContainerNode
,ImmutableLeafSetNodeBuilder.ImmutableLeafSetNode
,ImmutableMapNodeBuilder.ImmutableMapNode
,ImmutableUnkeyedListEntryNodeBuilder.ImmutableUnkeyedListEntryNode
,ImmutableUserLeafSetNodeBuilder.ImmutableUserLeafSetNode
,ImmutableUserMapNodeBuilder.ImmutableUserMapNode
public sealed interface DistinctContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode>
extends NormalizedContainer<V>
permits DistinctNodeContainer<K,V>, DataContainer
A
NormalizedContainer
which contains distinctly-addressable children.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opendaylight.yangtools.yang.data.api.schema.OrderingAware
OrderingAware.System, OrderingAware.User
-
Method Summary
Modifier and TypeMethodDescriptionCollection<@NonNull V>
body()
Returns the body of this node.@Nullable V
childByArg
(K key) Returns a child node identified by provided key.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.NormalizedContainer
isEmpty, size
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.NormalizedData
contract, name
Methods inherited from interface org.opendaylight.yangtools.yang.data.api.schema.OrderingAware
ordering
-
Method Details
-
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 interfaceNormalizedContainer<K extends YangInstanceIdentifier.PathArgument>
- Specified by:
body
in interfaceNormalizedData
- Returns:
- Iteration of all child nodes
-
childByArg
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
isnull
-
findChildByArg
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
isnull
-
getChildByArg
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
isnull
VerifyException
- if the child does not exist
-