Interface DistinctNodeContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode>

Type Parameters:
K - Child path argument type
V - 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 non-sealed interface DistinctNodeContainer<K extends YangInstanceIdentifier.PathArgument,V extends NormalizedNode> extends NormalizedNodeContainer<V>
A NormalizedNodeContainer which contains directly-addressable children. It

NormalizedNodeContainer 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.

  • Method Details

    • body

      Collection<@NonNull V> body()
      Returns the body of this node. While the return value specifies Object, this method's return value has further semantics. The returned object must be a well-published contract, such as String, Collection<NormalizedNode> or DOMSource.

      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 interface NormalizedNode
      Specified by:
      body in interface NormalizedNodeContainer<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 - if key 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 - if key 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 - if key is null
      VerifyException - if the child does not exist